diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 000000000..21c41c121 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 000000000..9bded928e --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,12 @@ + + + + + mysql.8 + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://47.94.122.58:3306 + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/easyCodeTableSetting.xml b/.idea/easyCodeTableSetting.xml new file mode 100644 index 000000000..4c91bab52 --- /dev/null +++ b/.idea/easyCodeTableSetting.xml @@ -0,0 +1,145 @@ + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 000000000..2ba608642 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 000000000..712ab9d98 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 639900d13..3215920dd 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,14 @@ - + + + + + \ No newline at end of file diff --git a/fuintAdmin/src/api/EventMarketing/activeConsumption.js b/fuintAdmin/src/api/EventMarketing/activeConsumption.js index 4d257ea8d..d3a17a9e0 100644 --- a/fuintAdmin/src/api/EventMarketing/activeConsumption.js +++ b/fuintAdmin/src/api/EventMarketing/activeConsumption.js @@ -106,3 +106,19 @@ export function looklooklook(id) { }) } + +export function getInfoActivity() { + return request({ + url: 'business/marketingActivity/activeConsumption/getInfo', + method: 'get', + + }) +} + +export function addActivity(data) { + return request({ + url: 'business/marketingActivity/activeConsumption/add', + method: 'post', + data:data + }) +} diff --git a/fuintAdmin/src/api/EventMarketing/activeNewlyweds.js b/fuintAdmin/src/api/EventMarketing/activeNewlyweds.js index 3222b39d5..21e384389 100644 --- a/fuintAdmin/src/api/EventMarketing/activeNewlyweds.js +++ b/fuintAdmin/src/api/EventMarketing/activeNewlyweds.js @@ -68,3 +68,11 @@ export function delActiveNewlyweds(id) { method: 'delete' }) } + +// 删除新人有礼活动 +export function getInfoActiveNewlyweds() { + return request({ + url: '/business/marketingActivity/activeNewlyweds/getInfo', + method: 'get' + }) +} diff --git a/fuintAdmin/src/api/EventMarketing/openCardGift.js b/fuintAdmin/src/api/EventMarketing/openCardGift.js new file mode 100644 index 000000000..91cbaab00 --- /dev/null +++ b/fuintAdmin/src/api/EventMarketing/openCardGift.js @@ -0,0 +1,43 @@ +import request from '@/utils/request' + +// 查询开卡有礼信息 +export function getOpenCardInfo() { + return request({ + url: 'openCardGift', + method: 'get', + }) +} + +// 根据id查询开卡有礼信息 +export function getOpenCardById(id) { + return request({ + url: 'openCardGift/'+id, + method: 'get', + }) +} + +// 添加开卡有礼信息 +export function addOpenCardBy(data) { + return request({ + url: 'openCardGift', + method: 'post', + data:data + }) +} + +// 添加开卡有礼信息 +export function editOpenCardBy(data) { + return request({ + url: 'openCardGift', + method: 'put', + data:data + }) +} + +// 根据id删除开卡有礼信息 +export function deleteOpenCard(id) { + return request({ + url: 'openCardGift/'+id, + method: 'delete', + }) +} diff --git a/fuintAdmin/src/api/staff/staff.js b/fuintAdmin/src/api/staff/staff.js index ffbb3a313..6b948b1a3 100644 --- a/fuintAdmin/src/api/staff/staff.js +++ b/fuintAdmin/src/api/staff/staff.js @@ -134,3 +134,12 @@ export function delOilTag(id) { method: 'delete' }) } + + +// 删除员工 +export function getStaffByDeptId(deptId) { + return request({ + url: '/business/member/staff/getStaffByDeptId/' + deptId, + method: 'get' + }) +} diff --git a/fuintAdmin/src/api/sys/messageCost.js b/fuintAdmin/src/api/sys/messageCost.js index f6eb42254..61a9feb17 100644 --- a/fuintAdmin/src/api/sys/messageCost.js +++ b/fuintAdmin/src/api/sys/messageCost.js @@ -2,7 +2,7 @@ import request from '@/utils/request' // 分页查询所有的订单信息 -export function getListApi(query) { +export function getCostListApi(query) { return request({ url: 'MessageCost', method: 'get', @@ -18,14 +18,14 @@ export function getInfoApi(id) { }) } // -export function deleteApi(id) { +export function deleteCostApi(id) { return request({ url: 'MessageCost/' + id, method: 'delete' }) } // -export function saveApi(data) { +export function saveCostApi(data) { return request({ url: 'MessageCost', method: 'post', @@ -34,7 +34,7 @@ export function saveApi(data) { } // 保存修改信息 -export function updateApi(data) { +export function updateCostApi(data) { return request({ url: 'MessageCost', method: 'put', diff --git a/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue b/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue index e761738c2..d9af066c9 100644 --- a/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue +++ b/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue @@ -1,646 +1,879 @@ @@ -662,61 +895,61 @@ import { } from "@/api/EventMarketing/activeConsumption"; import {listUserGrade} from "@/api/staff/user/usergrade"; import {getOilNameList} from "@/api/order/oilnumgun"; -import {updateExchange} from "@/api/EventMarketing/cardExchange"; export default { name: "ActiveConsumption", + dicts: ['payment_type'], data() { return { - opendetails:false, - looklist:[], - statisticsyou:{}, - moneyList:[ - {name:'订单金额',id:'1'}, - {name:'实付金额',id:'2'} + opendetails: false, + looklist: [], + statisticsyou: {}, + moneyList: [ + {name: '订单金额', id: '1'}, + {name: '实付金额', id: '2'} ], - labelPosition:'left', - userGradeList:[], + labelPosition: 'left', + userGradeList: [], // 油号列表 - oilNameList:[], - pdidlist:[],//判断优惠券id - pddhidlist:[],//判断兑换券id - pdswidlist:[],//判断实物id - dialogTableVisible:false,//优惠券 - dialogTableVisibledh:false,//兑换券 - dialogTableVisiblesw:false,//实物 + oilNameList: [], + pdidlist: [],//判断优惠券id + pddhidlist: [],//判断兑换券id + pdswidlist: [],//判断实物id + dialogTableVisible: false,//优惠券 + dialogTableVisibledh: false,//兑换券 + dialogTableVisiblesw: false,//实物 tableData: [],//优惠券 - tableDatadh:[],//兑换券 - tableDatasw:[],//实物 - tableDatas:[],//公共选择区域 - tableData1:[],//公共选择区域 + tableDatadh: [],//兑换券 + tableDatasw: [],//实物 + tableDatas: [],//公共选择区域 + tableData1: [],//公共选择区域 //请求优惠券列表时的参数 - youhuiquan:{ - name:'', + youhuiquan: { + name: '', pageNum: 1, pageSize: 10, }, - ytotal:0, + ytotal: 0, //请求兑换券列表时的参数 - duihuanquan:{ - name:'', + duihuanquan: { + name: '', pageNum: 1, pageSize: 10, - total:0 + total: 0 }, - dtotal:0, + dtotal: 0, //请求实物列表时的参数 - shiwu:{ - isRecovery:0, + shiwu: { + isRecovery: 0, page: 1, pageSize: 10, }, - stotal:0, - shopdata:{ - goodsId:'', - count:0, + stotal: 0, + shopdata: { + goodsId: '', + count: 0, }, - oillist:['92#','95#','98#','0#','-10#','LNG','CNG','京92#','京95#','京0#',], + oillist: ['92#', '95#', '98#', '0#', '-10#', 'LNG', 'CNG', '京92#', '京95#', '京0#',], // 遮罩层 loading: true, // 选中数组 @@ -736,12 +969,12 @@ export default { // 是否显示弹出层 open: false, // 查询参数 - listFavorable:{ + listFavorable: { pageNum: 1, pageSize: 10, }, - listFavorablesw:{ - isRecovery:0, + listFavorablesw: { + isRecovery: 0, page: 1, pageSize: 10, }, @@ -772,57 +1005,82 @@ export default { }, // 表单参数 form: { - tableDatas:[], - shiwudata:[], + tableDatas: [], + shiwudata: [], }, + + + ruleForm: { + name: '', + region: '', + date1: '', + date2: '', + delivery: false, + type: [], + resource: '', + desc: '' + }, + ifWrite: true, + tindex1: 0, + activityTimeTypeList: [ + "永久有效", "自定义" + ], + weekMonthTypeList: ["每周", "每月"], + tindex3: 0, + weekList: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"], + weekDay: [], + monthDay: [], + pointList: [], + growthValueList: [], + couponList: [], // 表单校验 rules: { adaptOil: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], - moneyType:[ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + moneyType: [ + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], name: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], participationConditionMoney: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], activeStartTime: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], activeEndTime: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], adaptUserType: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], dieselUserLevel: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], gasolineUserLevel: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], naturalUserLevel: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], participationCondition: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], participationAcount: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], limitAcount: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], activeGift: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], status: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], isonline: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], points: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], activeConsumptionChildList: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], } }; @@ -834,6 +1092,63 @@ export default { this.listUserGrade() }, methods: { + addPoints(orderType) { + let data = { + activeGift: 0, + orderType: orderType, + consumeAmount: "", + givePoints: "", + } + this.pointList.push(data) + }, + deletePoints(index) { + this.pointList.splice(index, 1); + }, + addGrowthValues(orderType) { + let data = { + activeGift: 3, + orderType: orderType, + consumeAmount: "", + giveGrowthValue: "", + } + this.growthValueList.push(data) + }, + deleteGrowthValues(index) { + this.growthValueList.splice(index, 1); + }, + addCoupons(orderType) { + let data = { + activeGift: 1, + orderType: orderType, + vouchersId: "", + giftCardTotal: "", + } + this.couponList.push(data) + }, + deleteCoupons(index) { + this.couponList.splice(index, 1); + }, + Typeindex1(index) { + this.tindex1 = index + this.ruleForm.activityTimeType = index + }, + Typeindex3(index) { + this.tindex3 = index + this.ruleForm.suitTimeSlotType = index + }, + submitRuleForm(formName) { + this.$refs[formName].validate((valid) => { + if (valid) { + alert('submit!'); + } else { + console.log('error submit!!'); + return false; + } + }); + }, + resetForm(formName) { + this.$refs[formName].resetFields(); + }, indexMethod(index) { return index * 2; }, @@ -847,43 +1162,43 @@ export default { }); }, // - lookDetail(row){ + lookDetail(row) { this.opendetails = true let data = { - id:row.id, - exchangeFrom:"消费有礼" + id: row.id, + exchangeFrom: "消费有礼" } - looklook(data).then(res=>{ - if(res.data){ + looklook(data).then(res => { + if (res.data) { this.looklist = res.data } - console.log('详情',res) + console.log('详情', res) }) - looklooklook(row.id).then(resp=>{ - if( resp.data){ + looklooklook(row.id).then(resp => { + if (resp.data) { this.statisticsyou = resp.data } - console.log('优惠券详情统计',resp) + console.log('优惠券详情统计', resp) }) }, - listUserGrade(){ - listUserGrade().then(res=>{ - if(res.code == 200){ + listUserGrade() { + listUserGrade().then(res => { + if (res.code == 200) { this.userGradeList = res.data.records } }) }, // 获取油号名称 - getName(oilNameList,ids){ + getName(oilNameList, ids) { let name = "" let _this = this; ids.forEach(i => { oilNameList.forEach(item => { - if (item.id == i){ + if (item.id == i) { name += item.oilName + ","; } }) @@ -891,34 +1206,34 @@ export default { return name; }, // 查询油类 - getoiltypeliet(){ - getoiltype().then(res=>{ + getoiltypeliet() { + getoiltype().then(res => { console.log(res) }) }, // - getoilName(){ - getoilName().then(res=>{ + getoilName() { + getoilName().then(res => { console.log(res) this.oillist = res.data }) - getOilNameList().then( response => { + getOilNameList().then(response => { this.oilNameList = response.data; }) }, - swchange(e){ + swchange(e) { console.log(this.shopdata) }, // 请求实物 - getlistLJGoods(){ + getlistLJGoods() { this.tableDatasw = [] - listLJGoods(this.shiwu).then(res=>{ - if(res.code==200){ - console.log( res) + listLJGoods(this.shiwu).then(res => { + if (res.code == 200) { + console.log(res) this.dialogTableVisiblesw = true - this.tableDatasw = res.data.records + this.tableDatasw = res.data.records this.stotal = res.data.total @@ -926,71 +1241,71 @@ export default { }) }, // 请求兑换券 - getlistExchange(){ + getlistExchange() { this.tableDatadh = [] - listExchange(this.duihuanquan).then(res=>{ - if(res.code==200){ + listExchange(this.duihuanquan).then(res => { + if (res.code == 200) { this.dialogTableVisibledh = true - this.tableDatadh = res.data.records + this.tableDatadh = res.data.records this.dtotal = res.data.total } }) }, // 请求优惠券 - getlistFavorable(){ - this.tableData = [] - listFavorable(this.youhuiquan).then(res=>{ - if(res.code == 200){ + getlistFavorable() { + this.tableData = [] + listFavorable(this.youhuiquan).then(res => { + if (res.code == 200) { this.dialogTableVisible = true - this.tableData = res.data.records + this.tableData = res.data.records this.ytotal = res.data.total } }) }, // 实物选择处理 - shwdata(){ + shwdata() { this.dialogTableVisiblesw = false - if(this.pdswidlist.indexOf( this.shopdata.goodsId.id)>-1 ){ + if (this.pdswidlist.indexOf(this.shopdata.goodsId.id) > -1) { this.$message.error("该商品已存在") return } - this.pdswidlist.push( this.shopdata.goodsId.id,) + this.pdswidlist.push(this.shopdata.goodsId.id,) let data = { activeGift: 4, - goodsIds : this.shopdata.goodsId.id, + goodsIds: this.shopdata.goodsId.id, goodsName: this.shopdata.goodsId.name, - goodsTotal:this.shopdata.count + goodsTotal: this.shopdata.count } this.form.shiwudata.push(data) - console.log( this.form.shiwudata) + console.log(this.form.shiwudata) this.shopdata = [] }, // 兑换券券列表选择 - Favorabledata(row){ + Favorabledata(row) { this.dialogTableVisibledh = false - if(this.pddhidlist.indexOf(row.id)>-1 ){ + if (this.pddhidlist.indexOf(row.id) > -1) { this.$message.error("该兑换卡券已存在") return } this.pddhidlist.push(row.id) console.log(row) - let data ={ + let data = { activeGift: 2, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物 goodsIds: "", //商品id - goodsName:"" , //商品名称 + goodsName: "", //商品名称 goodsTotal: "", //商品数量 - vouchersId:row.id, //券id - giftCardName:row.name, //赠送卡券名称 + vouchersId: row.id, //券id + giftCardName: row.name, //赠送卡券名称 giftCardType: row.type, //券类型 validityZero: null, validityOne: null, - validityTwo:null, - validity:row.validity, + validityTwo: null, + validity: row.validity, giftCardDetail: row.cardDetail, //券详情 giftCardTime: row.validity, //券有效期 giftCardTotal: 1, //券数量 @@ -1001,27 +1316,27 @@ export default { this.$message.success("新增成功") }, // 优惠券列表选择 - chosedata(row){ + chosedata(row) { this.dialogTableVisible = false - if(this.pdidlist.indexOf(row.id)>-1 ){ + if (this.pdidlist.indexOf(row.id) > -1) { this.$message.error("该优惠卡券已存在") return } this.pdidlist.push(row.id) - let data ={ + let data = { activeGift: 1, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物 goodsIds: "", //商品id - goodsName:"" , //商品名称 + goodsName: "", //商品名称 goodsTotal: "", //商品数量 - vouchersId:row.id, //券id - giftCardName:row.name, //赠送卡券名称 + vouchersId: row.id, //券id + giftCardName: row.name, //赠送卡券名称 giftCardType: row.discountType, //券类型 timeType: row.timeType, validityZero: row.validityZero, validityOne: row.validityOne, - validityTwo:row.validityTwo, + validityTwo: row.validityTwo, giftCardDetail: row.cardDetail, //券详情 giftCardTime: "", //券有效期 giftCardTotal: 1,//券数量 @@ -1035,50 +1350,50 @@ export default { }, // 优惠券删除 - deletedata(row){ - if(this.tableData1&&this.tableData1.length>0){ - let delIdx=-1; - for ( let item of this.tableData1) { - delIdx++; - if (item.id===row.id){ + deletedata(row) { + if (this.tableData1 && this.tableData1.length > 0) { + let delIdx = -1; + for (let item of this.tableData1) { + delIdx++; + if (item.id === row.id) { break } } - this.pdidlist.splice(delIdx,1); - this.tableData1.splice(delIdx,1); + this.pdidlist.splice(delIdx, 1); + this.tableData1.splice(delIdx, 1); } }, // 兑换券删除 - deletedhdata(row){ - if(this.tableDatas&&this.tableDatas.length>0){ - let delIdx=-1; - for ( let item of this.tableDatas) { + deletedhdata(row) { + if (this.tableDatas && this.tableDatas.length > 0) { + let delIdx = -1; + for (let item of this.tableDatas) { delIdx++; - if (item.id===row.id){ + if (item.id === row.id) { break } } - this.pddhidlist.splice(delIdx,1); - this.tableDatas.splice(delIdx,1); + this.pddhidlist.splice(delIdx, 1); + this.tableDatas.splice(delIdx, 1); } }, // 实物删除 - deleteswdata(row){ + deleteswdata(row) { - if( this.form.shiwudata&& this.form.shiwudata.length>0){ - let delIdx=-1; - for ( let item of this.form.shiwudata) { + if (this.form.shiwudata && this.form.shiwudata.length > 0) { + let delIdx = -1; + for (let item of this.form.shiwudata) { delIdx++; - if (item.id===row.id){ + if (item.id === row.id) { break } } - this.pdswidlist.splice(delIdx,1); - this.form.shiwudata.splice(delIdx,1); + this.pdswidlist.splice(delIdx, 1); + this.form.shiwudata.splice(delIdx, 1); } @@ -1086,11 +1401,11 @@ export default { // 取消按钮 cancel() { this.pdswidlist = [] - this.form.shiwudata= [] - this.pddhidlist= [] - this.tableDatas= [] - this.pdidlist= [] - this.form.tableDatas= [] + this.form.shiwudata = [] + this.pddhidlist = [] + this.tableDatas = [] + this.pdidlist = [] + this.form.tableDatas = [] this.open = false; this.reset(); }, @@ -1121,17 +1436,17 @@ export default { createBy: null, createTime: null, updateBy: null, - tableDatas:[], - shiwudata:[], + tableDatas: [], + shiwudata: [], updateTime: null, - activeConsumptionChildList:[] + activeConsumptionChildList: [] }; this.pdswidlist = [] - this.form.shiwudata= [] - this.pddhidlist= [] - this.tableDatas= [] - this.pdidlist= [] - this.form.tableDatas= [] + this.form.shiwudata = [] + this.pddhidlist = [] + this.tableDatas = [] + this.pdidlist = [] + this.form.tableDatas = [] this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -1143,27 +1458,27 @@ export default { resetQuery() { this.queryParams = { pageNum: 1, - pageSize: 10, - chainStorId: null, - storeId: null, - name: null, - participationConditionMoney: null, - activeStartTime: null, - activeEndTime: null, - adaptOil: [], - adaptUserType: null, - memberType: null, - dieselUserLevel: null, - gasolineUserLevel: null, - naturalUserLevel: null, - paymentType: null, - participationCondition: null, - participationAcount: null, - limitAcount: null, - activeGift: [], - points: null, - status: null, - isonline: null, + pageSize: 10, + chainStorId: null, + storeId: null, + name: null, + participationConditionMoney: null, + activeStartTime: null, + activeEndTime: null, + adaptOil: [], + adaptUserType: null, + memberType: null, + dieselUserLevel: null, + gasolineUserLevel: null, + naturalUserLevel: null, + paymentType: null, + participationCondition: null, + participationAcount: null, + limitAcount: null, + activeGift: [], + points: null, + status: null, + isonline: null, } this.resetForm("queryForm"); this.handleQuery(); @@ -1171,7 +1486,7 @@ export default { // 多选框选中数据 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) - this.single = selection.length!==1 + this.single = selection.length !== 1 this.multiple = !selection.length }, /** 新增按钮操作 */ @@ -1190,7 +1505,7 @@ export default { getActiveConsumption(id).then(response => { this.form = response.data; if (!response.data.activeGift) this.form.activeGift = "" - if(response.data.activeConsumptionChildList && response.data.activeConsumptionChildList.length >0){ + if (response.data.activeConsumptionChildList && response.data.activeConsumptionChildList.length > 0) { this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1') this.tableData1 = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1') this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2') @@ -1201,7 +1516,7 @@ export default { this.title = "修改消费有礼活动"; }); }, - handleDeletexia(row){ + handleDeletexia(row) { // getActiveConsumption(row.id).then(response => { // // this.form = response.data; // let data = response.data @@ -1214,16 +1529,17 @@ export default { // // }); - this.$modal.confirm('确定下线此条修改消费有礼活动信息?').then(function() { - return editActiveConsumption({id:row.id,isonline:1}); + this.$modal.confirm('确定下线此条修改消费有礼活动信息?').then(function () { + return editActiveConsumption({id: row.id, isonline: 1}); }).then(() => { this.$modal.msgSuccess("下线成功"); this.open = false; this.getList(); - }).catch(() => {}); + }).catch(() => { + }); }, - qiyong(row){ - if(row.isonline == 1){ + qiyong(row) { + if (row.isonline == 1) { this.$message.error("下线不可进行操作") return } @@ -1239,8 +1555,8 @@ export default { }); }, - jinyong(row){ - if(row.isonline == 1){ + jinyong(row) { + if (row.isonline == 1) { this.$message.error("下线不可进行操作") return } @@ -1286,15 +1602,16 @@ export default { } }); }, - Deleteshan(row){ + Deleteshan(row) { - const ids = row.id || this.ids; - this.$modal.confirm('是否确认删除此项消费有礼活动?').then(function() { - return delActiveConsumption(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); - }).catch(() => {}); + const ids = row.id || this.ids; + this.$modal.confirm('是否确认删除此项消费有礼活动?').then(function () { + return delActiveConsumption(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("删除成功"); + }).catch(() => { + }); }, /** 删除按钮操作 */ @@ -1309,18 +1626,48 @@ export default { }; diff --git a/fuintAdmin/src/views/EventMarketing/activeNewlyweds/index.vue b/fuintAdmin/src/views/EventMarketing/activeNewlyweds/index.vue index 21fde59ae..394a6956b 100644 --- a/fuintAdmin/src/views/EventMarketing/activeNewlyweds/index.vue +++ b/fuintAdmin/src/views/EventMarketing/activeNewlyweds/index.vue @@ -1,528 +1,639 @@ @@ -535,7 +646,7 @@ import { addActiveNewlyweds, updateActiveNewlyweds, huiActiveNewlyweds, - editActiveNewlyweds + editActiveNewlyweds, getInfoActiveNewlyweds } from "@/api/EventMarketing/activeNewlyweds"; import {getoilName, listExchange, listFavorable, looklook, looklooklook} from "@/api/EventMarketing/activeConsumption"; import QRCode from "qrcodejs2"; @@ -550,34 +661,34 @@ export default { name: "ActiveNewlyweds", data() { return { - opendetails:false, - looklist:[], - statisticsyou:{}, - labelPosition:'left', - loadingdialog:false, - centerDialogVisible:false, - pdidlist:[],//判断优惠券id - pddhidlist:[],//判断兑换券id + opendetails: false, + looklist: [], + statisticsyou: {}, + labelPosition: 'left', + loadingdialog: false, + centerDialogVisible: false, + pdidlist: [],//判断优惠券id + pddhidlist: [],//判断兑换券id tableData: [],//优惠券 - tableDatadh:[],//兑换券 - dialogTableVisible:false,//优惠券 - dialogTableVisibledh:false,//兑换券 - tableDatas:[], + tableDatadh: [],//兑换券 + dialogTableVisible: false,//优惠券 + dialogTableVisibledh: false,//兑换券 + tableDatas: [], //请求优惠券列表时的参数 - youhuiquan:{ - name:'', + youhuiquan: { + name: '', pageNum: 1, pageSize: 10, }, - ytotal:0, + ytotal: 0, //请求兑换券列表时的参数 - duihuanquan:{ - name:'', + duihuanquan: { + name: '', pageNum: 1, pageSize: 10, - total:0 + total: 0 }, - dtotal:0, + dtotal: 0, // 遮罩层 loading: true, // 选中数组 @@ -616,49 +727,119 @@ export default { activeFullminusList: [], // 表单参数 form: { - id:"", - tableDatas:[], - courtesyReward:[], - activeNewlywedsChildList:[], + id: "", + tableDatas: [], + courtesyReward: [], + activeNewlywedsChildList: [], }, + + ruleForm: { + name: '', + region: '', + date1: '', + date2: '', + delivery: false, + type: [], + resource: '', + desc: '' + }, + ifWrite: true, + tindex1: 0, + activityTimeTypeList: [ + "永久有效", "自定义" + ], + couponList: [], // 表单校验 rules: { name: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], activeStartTime: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], activeEndTime: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], courtesyReward: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], points: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], growthValue: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], remark: [ - { required: true, message: '必填项不能为空', trigger: 'blur' }, + {required: true, message: '必填项不能为空', trigger: 'blur'}, ], } }; }, created() { - this.getList() + // this.getList() + this.getInfo() }, methods: { + getInfo(){ + getInfoActiveNewlyweds().then(res => { + if (res.data) { + this.ruleForm = res.data + if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",") + if (res.data.activeTimeType) this.tindex1 = res.data.activeTimeType + if (res.data.couponList) this.couponList = res.data.couponList + }else { + this.ruleForm = { + courtesyReward:[] + } + } + }) + }, + addCoupons() { + let data = { + activeGift: 0, + vouchersId: "", + giftCardTotal: "", + } + this.couponList.push(data) + }, + deleteCoupons(index) { + this.couponList.splice(index, 1); + }, + Typeindex1(index) { + this.tindex1 = index + this.ruleForm.activeTimeType = index + }, + submitRuleForm(formName) { + this.$refs[formName].validate((valid) => { + if (valid) { + if (this.ruleForm.courtesyReward) this.ruleForm.courtesyReward = this.ruleForm.courtesyReward.toString() + if (this.couponList) this.ruleForm.couponList = this.couponList + if (this.ruleForm.id) { + updateActiveNewlyweds(this.form).then(response => { + this.$modal.msgSuccess("修改成功"); + this.getInfo() + }); + }else { + addActiveNewlyweds(this.form).then(response => { + this.$modal.msgSuccess("新增成功"); + this.getInfo() + }); + } + } + }); + }, + resetForm(formName) { + this.$refs[formName].resetFields(); + this.getInfo() + }, /** 查询新人有礼活动列表 */ getList() { this.loading = true; - listActiveNewlyweds(this.queryParams).then(res=>{ + listActiveNewlyweds(this.queryParams).then(res => { this.activeFullminusList = res.data.records this.ztotal = res.data.total; - console.log('wwwwwc',res) + console.log('wwwwwc', res) this.loading = false; }) // this.loading = true; @@ -668,21 +849,21 @@ export default { // this.loading = false; // }); }, - getoilName(){ - getoilName().then(res=>{ + getoilName() { + getoilName().then(res => { console.log(res) this.oillist = res.data }) }, - addDatas(){ + addDatas() { this.open = true this.form = { - id:"", - tableDatas:[], - courtesyReward:[], - activeNewlywedsChildList:[], + id: "", + tableDatas: [], + courtesyReward: [], + activeNewlywedsChildList: [], } this.form.tableDatas = [] this.tableDatas = [] @@ -723,8 +904,8 @@ export default { activeStartTime: null, activeEndTime: null, courtesyReward: [], - tableDatas:[], - activeNewlywedsChildList:[], + tableDatas: [], + activeNewlywedsChildList: [], activeCode: null, isonline: null, status: null, @@ -745,24 +926,24 @@ export default { }, // 请求兑换券 - getlistExchange(){ + getlistExchange() { this.tableDatadh = [] - listExchange(this.duihuanquan).then(res=>{ - if(res.code==200){ + listExchange(this.duihuanquan).then(res => { + if (res.code == 200) { this.dialogTableVisibledh = true - this.tableDatadh = res.data.records + this.tableDatadh = res.data.records this.dtotal = res.data.total } }) }, // 请求优惠券 - getlistFavorable(){ + getlistFavorable() { this.tableData = [] - listFavorable(this.youhuiquan).then(res=>{ - if(res.code == 200){ + listFavorable(this.youhuiquan).then(res => { + if (res.code == 200) { this.dialogTableVisible = true - this.tableData = res.data.records + this.tableData = res.data.records this.ytotal = res.data.total } @@ -770,28 +951,28 @@ export default { }, // 兑换券券列表选择 - Favorabledata(row){ + Favorabledata(row) { this.dialogTableVisibledh = false - if(this.pddhidlist.indexOf(row.id)>-1 ){ + if (this.pddhidlist.indexOf(row.id) > -1) { this.$message.error("该兑换卡券已存在") return } this.pddhidlist.push(row.id) console.log(row) - let data ={ + let data = { activeGift: 2, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物 goodsIds: "", //商品id - goodsName:"" , //商品名称 + goodsName: "", //商品名称 goodsTotal: "", //商品数量 - vouchersId:row.id, //券id - giftCardName:row.name, //赠送卡券名称 + vouchersId: row.id, //券id + giftCardName: row.name, //赠送卡券名称 giftCardType: row.type, //券类型 validityZero: null, validityOne: null, - validityTwo:null, - validity:row.validity, - giftCardDetail: row.cardDetail , //券详情 + validityTwo: null, + validity: row.validity, + giftCardDetail: row.cardDetail, //券详情 giftCardTime: row.validity, //券有效期 giftCardTotal: 1, //券数量 instruction: row.useInstructions, //使用说明 @@ -801,28 +982,28 @@ export default { this.$message.success("新增成功") }, // 优惠券列表选择 - chosedata(row){ + chosedata(row) { this.dialogTableVisible = false - if(this.pdidlist.indexOf(row.id)>-1 ){ + if (this.pdidlist.indexOf(row.id) > -1) { this.$message.error("该优惠卡券已存在") return } this.pdidlist.push(row.id) - let data ={ + let data = { activeGift: 1, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物 goodsIds: "", //商品id - goodsName:"" , //商品名称 + goodsName: "", //商品名称 goodsTotal: "", //商品数量 - vouchersId:row.id, //券id - giftCardName:row.name, //赠送卡券名称 + vouchersId: row.id, //券id + giftCardName: row.name, //赠送卡券名称 giftCardType: row.discountType, //券类型 timeType: row.timeType, validityZero: row.validityZero, validityOne: row.validityOne, - validityTwo:row.validityTwo, - giftCardDetail: row.cardDetail , //券详情 + validityTwo: row.validityTwo, + giftCardDetail: row.cardDetail, //券详情 giftCardTime: "", //券有效期 giftCardTotal: 1,//券数量 instruction: row.instruction,//使用说明 @@ -834,61 +1015,62 @@ export default { }, // 优惠券删除 - deletedata(row){ - if(this.form.tableDatas&&this.form.tableDatas.length>0){ - let delIdx=-1; - for ( let item of this.form.tableDatas) { + deletedata(row) { + if (this.form.tableDatas && this.form.tableDatas.length > 0) { + let delIdx = -1; + for (let item of this.form.tableDatas) { delIdx++; - if (item.id===row.id){ + if (item.id === row.id) { break } } - this.pdidlist.splice(delIdx,1); - this.form.tableDatas.splice(delIdx,1); + this.pdidlist.splice(delIdx, 1); + this.form.tableDatas.splice(delIdx, 1); } }, // 兑换券删除 - deletedhdata(row){ - if(this.tableDatas&&this.tableDatas.length>0){ - let delIdx=-1; - for ( let item of this.tableDatas) { + deletedhdata(row) { + if (this.tableDatas && this.tableDatas.length > 0) { + let delIdx = -1; + for (let item of this.tableDatas) { delIdx++; - if (item.id===row.id){ + if (item.id === row.id) { break } } - this.pddhidlist.splice(delIdx,1); - this.tableDatas.splice(delIdx,1); + this.pddhidlist.splice(delIdx, 1); + this.tableDatas.splice(delIdx, 1); } }, - lookDetail(row){ + lookDetail(row) { this.opendetails = true let data = { - id:row.id, - exchangeFrom:"新人有礼" + id: row.id, + exchangeFrom: "新人有礼" } - looklook(data).then(res=>{ + looklook(data).then(res => { this.looklist = res.data - console.log('详情',res) + console.log('详情', res) }) - looklooklook(row.id).then(resp=>{ + looklooklook(row.id).then(resp => { this.statisticsyou = resp.data - console.log('优惠券详情统计',resp) + console.log('优惠券详情统计', resp) }) }, - Deleteshan(row){ + Deleteshan(row) { const ids = row.id || this.ids; - this.$modal.confirm('是否确认删除此条新人有礼活动的信息?').then(function() { + this.$modal.confirm('是否确认删除此条新人有礼活动的信息?').then(function () { return delActiveNewlyweds(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("删除成功"); - }).catch(() => {}); + }).catch(() => { + }); }, /** 搜索按钮操作 */ @@ -904,7 +1086,7 @@ export default { // 多选框选中数据 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) - this.single = selection.length!==1 + this.single = selection.length !== 1 this.multiple = !selection.length }, /** 新增按钮操作 */ @@ -914,11 +1096,11 @@ export default { this.title = "添加新人有礼活动"; }, /** 修改按钮操作 */ - handleUpdate(row){ + handleUpdate(row) { this.reset() getActiveNewlyweds(row.id).then(response => { this.form = response.data; - if(response.data.activeNewlywedsChildList){ + if (response.data.activeNewlywedsChildList) { this.form.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '1') this.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '2') } @@ -926,7 +1108,7 @@ export default { this.title = "编辑"; }); }, - handleDeletexia(row,isonline){ + handleDeletexia(row, isonline) { // getActiveNewlyweds(row.id).then(response => { // // let data = response.data @@ -938,13 +1120,14 @@ export default { // }); // // }); - this.$modal.confirm('确定上线此条新人有礼活动信息?').then(function() { - return editActiveNewlyweds({id:row.id,isonline:isonline}); + this.$modal.confirm('确定上线此条新人有礼活动信息?').then(function () { + return editActiveNewlyweds({id: row.id, isonline: isonline}); }).then(() => { this.$modal.msgSuccess("上线成功"); this.open = false; this.getList(); - }).catch(() => {}); + }).catch(() => { + }); }, submitForm() { // this.form.activeNewlywedsChildList @@ -959,7 +1142,7 @@ export default { this.open = false; this.getList(); }); - }else { + } else { addActiveNewlyweds(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; @@ -996,12 +1179,13 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; - this.$modal.confirm('是否确认删除此条新人有礼活动信息?').then(function() { + this.$modal.confirm('是否确认删除此条新人有礼活动信息?').then(function () { return delActiveNewlyweds(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("删除成功"); - }).catch(() => {}); + }).catch(() => { + }); }, /** 导出按钮操作 */ handleExport() { @@ -1013,18 +1197,49 @@ export default { }; diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/会员营销@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/会员营销@2x.png new file mode 100644 index 000000000..5a6f9c89c Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/会员营销@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/充值@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/充值@2x.png new file mode 100644 index 000000000..5392ad751 Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/充值@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/券@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/券@2x.png new file mode 100644 index 000000000..cf7e4ab22 Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/券@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/折扣@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/折扣@2x.png new file mode 100644 index 000000000..0aecb8af7 Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/折扣@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/消费券@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/消费券@2x.png new file mode 100644 index 000000000..c1f1c229c Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/消费券@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/消费卡@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/消费卡@2x.png new file mode 100644 index 000000000..ef4aa5d78 Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/消费卡@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/特价申请单@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/特价申请单@2x.png new file mode 100644 index 000000000..743ca63ba Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/特价申请单@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/理财@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/理财@2x.png new file mode 100644 index 000000000..05b5dc73b Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/理财@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/生日专区@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/生日专区@2x.png new file mode 100644 index 000000000..01575f4aa Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/生日专区@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/礼物@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/礼物@2x.png new file mode 100644 index 000000000..a0b2f53a9 Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/礼物@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/营销@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/营销@2x.png new file mode 100644 index 000000000..34b006f5e Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/营销@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/邀请@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/邀请@2x.png new file mode 100644 index 000000000..b86d74ff1 Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/邀请@2x.png differ diff --git a/fuintAdmin/src/views/EventMarketing/center/index.vue b/fuintAdmin/src/views/EventMarketing/center/index.vue index a85bd715a..cfc5675eb 100644 --- a/fuintAdmin/src/views/EventMarketing/center/index.vue +++ b/fuintAdmin/src/views/EventMarketing/center/index.vue @@ -1,77 +1,262 @@