Merge branch 'bd-dev' of 47.94.45.65:angelo/web-base-admin into bd-test

This commit is contained in:
woody 2025-09-16 13:40:47 +08:00
commit 79ff2f4b3c
8 changed files with 399 additions and 1866 deletions

View File

@ -318,3 +318,27 @@ export function getBenefitsRuleLogList(params) {
}) })
} }
// 消费赠送
export function consumeRuleConfigSubmit(data) {
return request({
url: '/sale/manage/consume-rule-config/submit',
method: 'post',
data
})
}
// 会员消费赠送:
export function memberConsumeRuleSubmit(data) {
return request({
url: '/sale/manage/member-consume-rule/submit',
method: 'post',
data
})
}
// 商品赠送:
export function waresRuleConfigSubmit(data) {
return request({
url: '/sale/manage/wares-rule-config/submit',
method: 'post',
data
})
}

View File

@ -466,10 +466,9 @@ export const constantRoutes = [
path: 'deleteDeadLock', path: 'deleteDeadLock',
name: 'DeleteDeadLock', name: 'DeleteDeadLock',
component: () => import('@/views/information/specialBusiness/deleteDeadLock/index'), component: () => import('@/views/information/specialBusiness/deleteDeadLock/index'),
meta: {title: '删除死点'} meta: { title: '删除死点' }
} }
] ]
}, },
@ -1858,13 +1857,6 @@ export const constantRoutes = [
component: () => import('@/views/marketing/giftGoods/setGiftGoodsInfo'), component: () => import('@/views/marketing/giftGoods/setGiftGoodsInfo'),
meta: { title: '规则设置' }, meta: { title: '规则设置' },
hidden: true hidden: true
},
{
path: 'giftGoodsZxqc',
name: 'GiftGoodsZxqc',
component: () => import('@/views/marketing/giftGoods/giftGoodsZxqc'),
meta: { title: '在线签呈' },
hidden: true
} }
] ]
}, },
@ -1892,14 +1884,8 @@ export const constantRoutes = [
component: () => import('@/views/marketing/consumptionGift/setConsumptionInfo'), component: () => import('@/views/marketing/consumptionGift/setConsumptionInfo'),
meta: { title: '规则设置' }, meta: { title: '规则设置' },
hidden: true hidden: true
},
{
path: 'consumptionGiftZxqc',
name: 'ConsumptionGiftZxqc',
component: () => import('@/views/marketing/consumptionGift/consumptionGiftZxqc'),
meta: { title: '在线签呈' },
hidden: true
} }
] ]
}, },
{ {
@ -1926,13 +1912,6 @@ export const constantRoutes = [
component: () => import('@/views/marketing/memberConsumptionGift/setConsumptionInfo'), component: () => import('@/views/marketing/memberConsumptionGift/setConsumptionInfo'),
meta: { title: '规则设置' }, meta: { title: '规则设置' },
hidden: true hidden: true
},
{
path: 'memberConsumptionGiftZxqc',
name: 'MemberConsumptionGiftZxqc',
component: () => import('@/views/marketing/memberConsumptionGift/consumptionGiftZxqc'),
meta: { title: '在线签呈' },
hidden: true
} }
] ]
}, },

View File

@ -10,8 +10,13 @@
:topList="topList" :topList="topList"
:moren="moren"></topBar> --> :moren="moren"></topBar> -->
<div class="topbox"> <div class="topbox">
<div class="levelList_i" :class="tabActive == item.id ? 'act' : ''" v-for="(item, index) in topList" :key="index" <div
@click.prevent="handleLink(item.id)"> v-for="(item, index) in topList"
:key="index"
class="levelList_i"
:class="tabActive == item.id ? 'act' : ''"
@click.prevent="handleLink(item.id)"
>
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
@ -20,12 +25,12 @@
<div class="main"> <div class="main">
<div v-show="tabActive == 0"> <div v-show="tabActive == 0">
<div class="tit">{{ '基本信息' }}</div> <div class="tit">{{ '基本信息' }}</div>
<div class="xian"></div> <div class="xian" />
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="auto" class="demo-ruleForm"> <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="auto" class="demo-ruleForm">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'活动名称'" prop="actName"> <el-form-item :label="'活动名称'" prop="actName">
<el-input clearable v-model="ruleForm.actName" :disabled="lookOver"></el-input> <el-input v-model="ruleForm.actName" clearable :disabled="lookOver" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -36,8 +41,13 @@
type="textarea" type="textarea"
v-model="ruleForm.actExplain" v-model="ruleForm.actExplain"
:disabled="lookOver"></el-input> --> :disabled="lookOver"></el-input> -->
<editor ref="sptwEditor" :readOnly="lookOver" v-model="ruleForm.actExplain" :min-height="196" <editor
:uploadUrl="uploadImgUrl" /> ref="sptwEditor"
v-model="ruleForm.actExplain"
:read-only="lookOver"
:min-height="196"
:upload-url="uploadImgUrl"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -52,27 +62,33 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="'目标用户群体'" required> <el-form-item :label="'目标用户群体'" required>
<div class="flexed"> <div class="flexed">
<el-checkbox class="flexed_l" @change="getCheckTit($event, 1)" v-model="ruleForm.checked1">{{ <el-checkbox v-model="ruleForm.checked1" class="flexed_l" @change="getCheckTit($event, 1)">{{
'注册等级' }}</el-checkbox> '注册等级' }}</el-checkbox>
<el-checkbox-group v-model="ruleForm.levelList" @change="getCheck"> <el-checkbox-group v-model="ruleForm.levelList" @change="getCheck">
<el-checkbox v-for="item in gradeList" :key="item.pkId" :label="item.pkId">{{ item.gradeName <el-checkbox v-for="item in gradeList" :key="item.pkId" :label="item.pkId">{{ item.gradeName
}}</el-checkbox> }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="flexed"> <div class="flexed">
<el-checkbox class="flexed_l" @change="getCheckTit($event, 2)" <el-checkbox
v-model="ruleForm.checked2">{{ '真实奖衔' }}</el-checkbox> v-model="ruleForm.checked2"
class="flexed_l"
@change="getCheckTit($event, 2)"
>{{ '真实奖衔' }}</el-checkbox>
<el-checkbox-group v-model="ruleForm.realList" @change="getCheck"> <el-checkbox-group v-model="ruleForm.realList" @change="getCheck">
<el-checkbox v-for="item in awardsList" :key="item.pkId" :label="item.pkId">{{ item.awardsName <el-checkbox v-for="item in awardsList" :key="item.pkId" :label="item.pkId">{{ item.awardsName
}}</el-checkbox> }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="flexed"> <div class="flexed">
<el-checkbox class="flexed_l" @change="getCheckTit($event, 3)" <el-checkbox
v-model="ruleForm.checked3">{{ '权限中心' }}</el-checkbox> v-model="ruleForm.checked3"
class="flexed_l"
@change="getCheckTit($event, 3)"
>{{ '权限中心' }}</el-checkbox>
<el-checkbox-group v-model="ruleForm.centerList" @change="getCheck"> <el-checkbox-group v-model="ruleForm.centerList" @change="getCheck">
<el-checkbox v-for="item in registList" :key="item.value" :label="item.value">{{ item.label <el-checkbox v-for="item in registList" :key="item.value" :label="item.value">{{ item.label
}}</el-checkbox> }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</el-form-item> </el-form-item>
@ -81,20 +97,32 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'活动时间'" prop="ruleFormTime"> <el-form-item :label="'活动时间'" prop="ruleFormTime">
<el-date-picker :disabled="lookOver" v-model="ruleForm.ruleFormTime" @change="changeTime" <el-date-picker
value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" :range-separator="'至'" v-model="ruleForm.ruleFormTime"
:start-placeholder="'开始日期'" :end-placeholder="'结束日期'"> :disabled="lookOver"
</el-date-picker> value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
:range-separator="'至'"
:start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
@change="changeTime"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'展示时间'" prop="ruleFormTime1"> <el-form-item :label="'展示时间'" prop="ruleFormTime1">
<el-date-picker :disabled="lookOver" v-model="ruleForm.ruleFormTime1" @change="changeTime1" <el-date-picker
value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" :range-separator="'至'" v-model="ruleForm.ruleFormTime1"
:start-placeholder="'开始日期'" :end-placeholder="'结束日期'"> :disabled="lookOver"
</el-date-picker> value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
:range-separator="'至'"
:start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
@change="changeTime1"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -102,13 +130,13 @@
</el-form> </el-form>
</div> </div>
<setConsumptionInfo v-show="tabActive == 1" ref="setConsumptionInfo"></setConsumptionInfo> <setConsumptionInfo v-show="tabActive == 1" ref="setConsumptionInfo" />
<shieldConsumption v-show="tabActive == 2" ref="shieldConsumption"></shieldConsumption> <shieldConsumption v-show="tabActive == 2" ref="shieldConsumption" />
</div> </div>
<div class="footer" v-show="controlType != 4"> <div v-show="controlType != 4" class="footer">
<el-button size="small" class="cancelBtn"> {{ '取消' }}</el-button> <el-button size="small" class="cancelBtn" @click="$router.back()"> {{ '取消' }}</el-button>
<el-button size="small" @click="submit('ruleForm')" class="sureBtn"> {{ '确认' }}</el-button> <el-button size="small" class="sureBtn" @click="submit('ruleForm')"> {{ '确认' }}</el-button>
</div> </div>
<!-- </div> --> <!-- </div> -->
@ -138,16 +166,16 @@ export default {
topList: [ topList: [
{ {
name: '基本信息', name: '基本信息',
id: 0, id: 0
}, },
{ {
name: '规则设置', name: '规则设置',
id: 1, id: 1
}, },
{ {
name: '屏蔽设置', name: '屏蔽设置',
id: 2, id: 2
}, }
], ],
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload', uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
ruleForm: { ruleForm: {
@ -157,27 +185,27 @@ export default {
levelList: [], levelList: [],
realList: [], realList: [],
centerList: [], centerList: [],
goalMemberConfigList: [], goalMemberConfigList: []
}, },
rules: { rules: {
actName: [ actName: [
{ required: true, message: '请输入活动名称', trigger: 'blur' }, { required: true, message: '请输入活动名称', trigger: 'blur' }
], ],
actExplain: [ actExplain: [
{ required: true, message: '请输入活动说明', trigger: 'blur' }, { required: true, message: '请输入活动说明', trigger: 'blur' }
], ],
actCover: [ actCover: [
{ required: true, message: '请上传活动封面', trigger: 'change' }, { required: true, message: '请上传活动封面', trigger: 'change' }
], ],
goalMemberConfigList: [ goalMemberConfigList: [
{ required: true, message: '请选择目标用户群体', trigger: 'change' }, { required: true, message: '请选择目标用户群体', trigger: 'change' }
], ],
ruleFormTime: [ ruleFormTime: [
{ required: true, message: '请选择活动时间', trigger: 'change' }, { required: true, message: '请选择活动时间', trigger: 'change' }
], ],
ruleFormTime1: [ ruleFormTime1: [
{ required: true, message: '请选择展示时间', trigger: 'change' }, { required: true, message: '请选择展示时间', trigger: 'change' }
], ]
}, },
lookOver: false, lookOver: false,
gradeList: [], gradeList: [],
@ -186,7 +214,7 @@ export default {
pkId: '', pkId: '',
waresConfigParam: [], waresConfigParam: [],
consumeShieldConfigList: [], consumeShieldConfigList: [],
controlType:'' controlType: ''
} }
}, },
mounted() { mounted() {
@ -219,7 +247,7 @@ export default {
getDetails() { getDetails() {
api api
.consumeDetails({ .consumeDetails({
pkId: this.pkId, pkId: this.pkId
}) })
.then((res) => { .then((res) => {
this.waresConfigParam = res.data.consumeRuleConfigParamList this.waresConfigParam = res.data.consumeRuleConfigParamList
@ -235,15 +263,15 @@ export default {
this.ruleForm.disEndDate = res.data.disEndDate this.ruleForm.disEndDate = res.data.disEndDate
this.$set(this.ruleForm, 'ruleFormTime', [ this.$set(this.ruleForm, 'ruleFormTime', [
res.data.actStartDate, res.data.actStartDate,
res.data.actEndDate, res.data.actEndDate
]) ])
this.$set(this.ruleForm, 'ruleFormTime1', [ this.$set(this.ruleForm, 'ruleFormTime1', [
res.data.disStartDate, res.data.disStartDate,
res.data.disEndDate, res.data.disEndDate
]) ])
let arr1 = [], const arr1 = []
arr2 = [], const arr2 = []
arr3 = [] const arr3 = []
res.data.goalMemberConfigList.forEach((item) => { res.data.goalMemberConfigList.forEach((item) => {
if (item.memberType == 1) { if (item.memberType == 1) {
arr1.push(item.pkLevel) arr1.push(item.pkLevel)
@ -262,7 +290,7 @@ export default {
this.$refs.shieldConsumption.getPage( this.$refs.shieldConsumption.getPage(
res.data.consumeShieldConfigList || '' res.data.consumeShieldConfigList || ''
) )
let that = this const that = this
setTimeout(() => { setTimeout(() => {
that.getCheck() that.getCheck()
}, 50) }, 50)
@ -283,15 +311,15 @@ export default {
this.ruleForm.disEndDate = this.addData.activityParam.disEndDate this.ruleForm.disEndDate = this.addData.activityParam.disEndDate
this.$set(this.ruleForm, 'ruleFormTime', [ this.$set(this.ruleForm, 'ruleFormTime', [
this.addData.activityParam.actStartDate, this.addData.activityParam.actStartDate,
this.addData.activityParam.actEndDate, this.addData.activityParam.actEndDate
]) ])
this.$set(this.ruleForm, 'ruleFormTime1', [ this.$set(this.ruleForm, 'ruleFormTime1', [
this.addData.activityParam.disStartDate, this.addData.activityParam.disStartDate,
this.addData.activityParam.disEndDate, this.addData.activityParam.disEndDate
]) ])
let arr1 = [], const arr1 = []
arr2 = [], const arr2 = []
arr3 = [] const arr3 = []
this.addData.activityParam.goalMemberConfigList.forEach((item) => { this.addData.activityParam.goalMemberConfigList.forEach((item) => {
if (item.memberType == 1) { if (item.memberType == 1) {
arr1.push(item.pkLevel) arr1.push(item.pkLevel)
@ -310,7 +338,7 @@ export default {
this.$refs.shieldConsumption.getPage( this.$refs.shieldConsumption.getPage(
this.addData.activityParam.consumeShieldConfigList || '' this.addData.activityParam.consumeShieldConfigList || ''
) )
let that = this const that = this
setTimeout(() => { setTimeout(() => {
that.getCheck() that.getCheck()
}, 500) }, 500)
@ -327,28 +355,28 @@ export default {
}, },
// //
getCheck() { getCheck() {
let arr1 = [] const arr1 = []
let arr2 = [] const arr2 = []
let arr3 = [] const arr3 = []
// //
this.ruleForm.levelList.forEach((item) => { this.ruleForm.levelList.forEach((item) => {
arr1.push({ arr1.push({
memberType: 1, memberType: 1,
pkLevel: item, pkLevel: item
}) })
}) })
// //
this.ruleForm.realList.forEach((item) => { this.ruleForm.realList.forEach((item) => {
arr2.push({ arr2.push({
memberType: 2, memberType: 2,
pkLevel: item, pkLevel: item
}) })
}) })
// //
this.ruleForm.centerList.forEach((item) => { this.ruleForm.centerList.forEach((item) => {
arr3.push({ arr3.push({
memberType: 3, memberType: 3,
pkLevel: item, pkLevel: item
}) })
}) })
this.ruleForm.goalMemberConfigList = [...arr1, ...arr2, ...arr3] this.ruleForm.goalMemberConfigList = [...arr1, ...arr2, ...arr3]
@ -442,44 +470,53 @@ export default {
// }) // })
// } // }
// }) // })
let a = Object.assign({}, this.ruleForm, { const a = Object.assign({}, this.ruleForm, {
consumeRuleConfigParamList: this.$refs.setConsumptionInfo.allData, consumeRuleConfigParamList: this.$refs.setConsumptionInfo.allData,
consumeShieldConfigList: consumeShieldConfigList:
this.$refs.shieldConsumption.consumeShieldConfigList, this.$refs.shieldConsumption.consumeShieldConfigList
}) })
let obj = Object.assign({ const obj = Object.assign({
controlType: this.controlType, controlType: this.controlType,
activityParam: a, activityParam: a
}) })
if (this.controlType == 1) { api.consumeRuleConfigSubmit(obj).then((res) => {
this.$router.push({ if (res.code === 200) {
path: 'consumptionGiftZxqc', this.$message({
query: { message: res.msg || '操作成功',
data: JSON.stringify(obj), type: 'success'
approvalBusiness: 738, })
}, this.$router.back()
}) }
} else if (this.controlType == 2) { })
this.$router.push({ // if (this.controlType == 1) {
path: 'consumptionGiftZxqc', // this.$router.push({
query: { // path: 'consumptionGiftZxqc',
data: JSON.stringify(obj), // query: {
approvalBusiness: 739, // data: JSON.stringify(obj),
}, // approvalBusiness: 738
}) // }
} else if (this.controlType == 3) { // })
this.$router.push({ // } else if (this.controlType == 2) {
path: 'consumptionGiftZxqc', // this.$router.push({
query: { // path: 'consumptionGiftZxqc',
data: JSON.stringify(obj), // query: {
approvalBusiness: 740, // data: JSON.stringify(obj),
}, // approvalBusiness: 739
}) // }
} // })
// } else if (this.controlType == 3) {
// this.$router.push({
// path: 'consumptionGiftZxqc',
// query: {
// data: JSON.stringify(obj),
// approvalBusiness: 740
// }
// })
// }
} }
}) })
}, }
}, }
} }
</script> </script>

View File

@ -1,547 +0,0 @@
<!--
* @Descripttion:
* @version:
* @Author: 王三华
* @Date: 2024-03-13 10:32:48
-->
<!--
* @Descripttion:
* @version:
* @Author: 王三华
* @Date: 2023-05-09 10:57:15
-->
<template>
<div class="page">
<topBar
v-if="topList.length > 0"
:top-list="topList"
:moren="moren"
/>
<div class="main">
<div class="thetable">
<div class="fontTitle"> {{ '在线签呈' }}</div>
<div class="titleflex">
<div>{{ '编号' }} :</div>
<div>
<el-radio-group v-model="allData.signType">
<el-radio
v-for="ctem in checkList"
:key="ctem.value"
:label="ctem.value"
>{{ ctem.label }}</el-radio>
</el-radio-group>
</div>
</div>
<table
id="tfhover"
class="tftable"
border="1"
>
<tr>
<td
colspan="1"
width="190px"
align="center"
> {{ '发起部门' }} :</td>
<td
v-if="allData.signData"
colspan="1"
width="435px"
>{{ allData.signData.deptName }}</td>
<td
colspan="1"
width="140px"
align="center"
> {{ '发起人' }} :</td>
<td
v-if="allData.signData"
colspan="1"
>{{ allData.signData.userName }}</td>
</tr>
<tr>
<td
colspan="1"
align="center"
> {{ '主旨' }} :</td>
<td
v-if="allData.signData"
colspan="1"
>{{ allData.signData.approvalBusinessVal }}</td>
<td
colspan="1"
align="center"
> {{ '日期' }} :</td>
<td
v-if="allData.signData"
colspan="1"
>{{ allData.signData.creationTime }}</td>
</tr>
<!-- // -->
<tr>
<td
colspan="1"
align="center"
> {{ '审批流程' }}</td>
<td colspan="3">
<div class="disflex">
<span
v-for="(ctem, cndex) in allData.signData.detailList"
style="margin:0 5px 5px 0"
>
<el-select
v-model="ctem.pkApprover"
filterable
size="mini"
:placeholder="'请选择'"
@change="getApprover"
>
<el-option
v-for="item in approbalList"
:key="item.userId"
:label="item.nickName + '(' +item.deptName+')'"
:value="item.userId"
/>
</el-select>
</span>
<span style="margin:0 5px 5px 0">
<i
v-show="allData.signData.detailList.length>0"
class="el-icon-remove-outline"
style="font-size:18px;margin-right:5px"
@click.stop="delData"
/>
<i
class="el-icon-circle-plus-outline"
style="font-size:18px"
@click.stop="addData"
/>
</span>
</div>
</td>
</tr>
<tr>
<td
colspan="1"
align="center"
>{{ '抄送人' }}</td>
<td colspan="3">
<div class="disflex">
<span
v-for="(ctem, cndex) in allData.signData.sendList"
style="margin:0 5px 5px 0"
>
<el-select
v-model="ctem.pkSend"
filterable
size="mini"
:placeholder="'请选择'"
@change="getApprover"
>
<el-option
v-for="item in userAllList"
:key="item.userId"
:label="item.nickName + '(' +item.deptName+')'"
:value="item.userId"
/>
</el-select>
</span>
<span style="margin:0 5px 5px 0">
<i
v-show="allData.signData.sendList.length>0"
class="el-icon-remove-outline"
style="font-size:18px;margin-right:5px"
@click.stop="delData1"
/>
<i
class="el-icon-circle-plus-outline"
style="font-size:18px"
@click.stop="addData1"
/>
</span>
</div>
</td>
</tr>
<tr>
<td
style="height: 190px"
align="center"
>{{ '情况说明' }}</td>
<td
colspan="3"
style="padding: 0"
>
<div>
<!-- <el-input type="textarea"
:rows="6"
:placeholder="'请输入'"
v-model="allData.remark">
</el-input> -->
<noImgEditor
v-model="allData.remark"
:min-height="190"
/>
</div>
</td>
</tr>
<tr>
<td
style="height: 193px"
align="center"
> {{ '业务诉求' }}</td>
<td
colspan="3"
style="padding: 0;vertical-align: top;"
>
<div>
<el-table
:data="allData.updateParentParamList"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
>
<el-table-column
v-for="ctem in allData.tableTit"
:key="ctem.value"
align="center"
:prop="ctem.value"
:label="ctem.label"
>
<template slot-scope="scope">
<div v-show="ctem.value== 'actExplain'">
<div
style="color: #48B2FD;text-decoration:underline;cursor: pointer"
@click="details"
>
{{ '查看详情' }}
</div>
</div>
<div v-show="ctem.value!= 'actExplain'">
<div>
{{ scope.row[ctem.value] }}
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
</td>
</tr>
<tr>
<td
style="height: 190px"
align="center"
>{{ '附件' }}</td>
<td
colspan="3"
style="padding: 0"
>
<div style="height: 100%;padding: 10px 20px">
<el-upload
class="upload-demo"
:action="uploadImgUrl"
:on-success="handleUploadSuccess"
:on-remove="removeFile"
multiple
:headers="headers"
:file-list="fileList"
>
<el-button
size="small"
type="primary"
>{{ '点击上传' }}</el-button>
</el-upload>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="footer">
<div style="margin: 0 auto">
<el-button
class="thebtn"
@click="cancelCz"
> {{ '取消' }}</el-button>
<el-button
type="primary"
class="thebtn"
@click="saveDate"
> {{ '确认' }}</el-button>
</div>
</div>
</div>
</template>
<script>
import topBar from '@/components/topBar'
import * as man from '@/api/manage'
import onlineSign from '../../dashboard/onlineSign.json'
import { getToken } from '@/utils/auth'
export default {
name: 'Zxqc',
components: {
topBar
},
data() {
return {
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload', //
headers: {
Authorization: getToken()
},
onlineSign,
moren: 'consumptionGiftZxqc',
topList: [
{
name: '在线签呈',
path: 'consumptionGiftZxqc'
}
],
checkList: [],
allData: {
remark: '',
signType: 1,
fileList: [],
signData: {
detailList: [],
sendList: []
},
approvalBusiness: ''
},
signDataList: [],
fileList: [],
approbalList: [],
//
userAllList: [],
allObj: {},
controlType: '' // 1=,2=,3=
}
},
mounted() {
//
this.allObj = JSON.parse(this.$route.query.data)
// let controlType = this.$route.query.controlType
// if (controlType == 1) {
// this.controlTypeVal = ''
// } else if (controlType == 2) {
// this.controlTypeVal = ''
// } else {
// this.controlTypeVal = ''
// }
this.allData.updateParentParamList = [this.allObj.activityParam]
//
this.allData.approvalBusiness = this.$route.query.approvalBusiness
this.getSignData([this.allData.approvalBusiness])
},
methods: {
details(code) {
this.$router.push({
path: '/marketing/consumptionGift/addConsumptionInfo',
query: {
controlType: 4,
data: JSON.stringify(this.allObj)
}
})
},
getSignData(arr) {
man.signData(arr).then((res) => {
this.allData.signData = res.data[0]
//
this.$set(this.allData, 'signType', 1)
this.$set(this.allData, 'remark', '')
this.$set(this.allData, 'fileList', [])
// table
this.onlineSign.forEach((ctem) => {
if (this.allData.approvalBusiness == ctem.id) {
this.allData.tableTit = ctem.textList
}
})
this.$forceUpdate()
this.getApprove()
this.getSignType()
})
},
getApprove() {
//
man.approvalUser().then((res) => {
this.approbalList = res.data
})
man.userAll().then((res) => {
this.userAllList = res.data
})
},
getSignType() {
man.signType().then((res) => {
this.checkList = res.data
})
},
saveDate() {
//
this.allData.userIdList = this.allData.signData.detailList.map((item) => {
return item.pkApprover
})
this.allData.userIdList = this.allData.userIdList.filter((item) => item)
//
this.allData.sendIdList = this.allData.signData.sendList.map((item) => {
return item.pkSend
})
this.allData.sendIdList = this.allData.sendIdList.filter((item) => item)
this.allData.fileList = this.fileList.map((item) => {
return item.url
})
const obj = {
activityParam: this.allObj.activityParam,
controlType: this.allObj.controlType,
signType: this.allData.signType, //
remark: this.allData.remark, //
fileList: this.allData.fileList, // []
userIdList: this.allData.userIdList, // []
sendIdList: this.allData.sendIdList // []
}
man.consumeOnline(obj).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: 'success'
})
this.$router.push({
path: '/marketing/consumptionGift/consumptionGiftList'
})
}
})
},
cancelCz() {
this.$router.go(-1)
},
//
getApprover() {
this.$nextTick(() => {
this.$forceUpdate()
})
},
//
addData() {
const arr = JSON.parse(JSON.stringify(this.allData.signData.detailList))
arr.push({
pkApprover: ''
})
this.$set(this.allData.signData, 'detailList', arr)
this.$forceUpdate()
},
//
addData1() {
const arr = JSON.parse(JSON.stringify(this.allData.signData.sendList))
arr.push({
pkSend: ''
})
this.$set(this.allData.signData, 'sendList', arr)
this.$forceUpdate()
},
//
delData1() {
this.allData.signData.sendList.pop()
this.$forceUpdate()
},
//
delData() {
this.allData.signData.detailList.pop()
this.$forceUpdate()
},
handleUploadSuccess(res) {
if (res.code == 200) {
this.fileList.push(res.data)
} else {
this.$message({
type: 'error',
message: '上传失败'
})
}
},
removeFile(file, fileList) {
this.fileList.forEach((item, index) => {
if (file.uid == item.uid) {
this.fileList.splice(index, 1)
}
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-table thead {
color: #000000;
}
.page {
padding: 20px;
background: #f9f9f9;
font-size: 14px;
.main {
// margin-top: 20px;
background: #ffffff;
border-radius: 8px;
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
display: flex;
margin: 0 auto;
width: 100%;
padding: 20px;
flex-direction: column;
}
.thetable {
margin: 0 auto;
margin-bottom: 20px;
.fontTitle {
font-weight: bold;
font-size: 24px;
text-align: center;
}
.titleflex {
display: flex;
margin-top: 10px;
margin-bottom: 10px;
justify-content: space-between;
}
}
.tftable {
font-size: 14px;
border-collapse: collapse;
border-radius: 10px;
width: 1060px;
border: 1px solid #cccccc;
.spbox {
display: flex;
align-items: center;
justify-content: flex-end;
}
th {
font-size: 14px;
// padding: 20px;
}
tr td {
font-size: 14px;
padding: 10px 20px;
height: 60px;
}
}
.footer {
display: flex;
justify-content: center;
align-items: center;
padding: 15px 0;
.thebtn {
width: 120px;
height: 38px;
}
}
}
//
.disflex {
display: flex;
align-items: center;
flex-wrap: wrap;
}
</style>

View File

@ -10,11 +10,13 @@
:topList="topList" :topList="topList"
:moren="moren"></topBar> --> :moren="moren"></topBar> -->
<div class="topbox"> <div class="topbox">
<div class="levelList_i" <div
:class="tabActive == item.id ? 'act' : ''" v-for="(item, index) in topList"
v-for="(item, index) in topList" :key="index"
:key="index" class="levelList_i"
@click.prevent="handleLink(item.id)"> :class="tabActive == item.id ? 'act' : ''"
@click.prevent="handleLink(item.id)"
>
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
@ -22,82 +24,114 @@
<!-- <div class="main_a"> --> <!-- <div class="main_a"> -->
<div class="main"> <div class="main">
<div v-show="tabActive==0"> <div v-show="tabActive==0">
<div class="tit">{{'基本信息'}}</div> <div class="tit">{{ '基本信息' }}</div>
<div class="xian"></div> <div class="xian" />
<el-form :model="ruleForm" <el-form
:rules="rules" ref="ruleForm"
ref="ruleForm" :model="ruleForm"
label-width="auto" :rules="rules"
class="demo-ruleForm"> label-width="auto"
class="demo-ruleForm"
>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'活动名称'" <el-form-item
prop="actName"> :label="'活动名称'"
<el-input clearable prop="actName"
v-model="ruleForm.actName" >
:disabled="lookOver"></el-input> <el-input
v-model="ruleForm.actName"
clearable
:disabled="lookOver"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<el-form-item :label="'活动说明'" <el-form-item
prop="actExplain"> :label="'活动说明'"
prop="actExplain"
>
<!-- <el-input clearable <!-- <el-input clearable
type="textarea" type="textarea"
v-model="ruleForm.actExplain" v-model="ruleForm.actExplain"
:disabled="lookOver"></el-input> --> :disabled="lookOver"></el-input> -->
<editor ref="sptwEditor" <editor
:readOnly="lookOver" ref="sptwEditor"
v-model="ruleForm.actExplain" v-model="ruleForm.actExplain"
:min-height="196" :read-only="lookOver"
:uploadUrl="uploadImgUrl" /> :min-height="196"
:upload-url="uploadImgUrl"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'活动封面'" <el-form-item
prop="actCover"> :label="'活动封面'"
prop="actCover"
>
<imageUpload v-model="ruleForm.actCover" /> <imageUpload v-model="ruleForm.actCover" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="'目标用户群体'" <el-form-item
required> :label="'目标用户群体'"
required
>
<div class="flexed"> <div class="flexed">
<el-checkbox class="flexed_l" <el-checkbox
@change="getCheckTit($event,1)" v-model="ruleForm.checked1"
v-model="ruleForm.checked1">{{ '注册等级' }}</el-checkbox> class="flexed_l"
<el-checkbox-group v-model="ruleForm.levelList" @change="getCheckTit($event,1)"
@change="getCheck"> >{{ '注册等级' }}</el-checkbox>
<el-checkbox v-for="item in gradeList" <el-checkbox-group
:key="item.pkId" v-model="ruleForm.levelList"
:label="item.pkId">{{ item.gradeName }}</el-checkbox> @change="getCheck"
>
<el-checkbox
v-for="item in gradeList"
:key="item.pkId"
:label="item.pkId"
>{{ item.gradeName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="flexed"> <div class="flexed">
<el-checkbox class="flexed_l" <el-checkbox
@change="getCheckTit($event,2)" v-model="ruleForm.checked2"
v-model="ruleForm.checked2">{{'真实奖衔'}}</el-checkbox> class="flexed_l"
<el-checkbox-group v-model="ruleForm.realList" @change="getCheckTit($event,2)"
@change="getCheck"> >{{ '真实奖衔' }}</el-checkbox>
<el-checkbox v-for="item in awardsList" <el-checkbox-group
:key="item.pkId" v-model="ruleForm.realList"
:label="item.pkId">{{ item.awardsName }}</el-checkbox> @change="getCheck"
>
<el-checkbox
v-for="item in awardsList"
:key="item.pkId"
:label="item.pkId"
>{{ item.awardsName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="flexed"> <div class="flexed">
<el-checkbox class="flexed_l" <el-checkbox
@change="getCheckTit($event,3)" v-model="ruleForm.checked3"
v-model="ruleForm.checked3">{{'权限中心'}}</el-checkbox> class="flexed_l"
<el-checkbox-group v-model="ruleForm.centerList" @change="getCheckTit($event,3)"
@change="getCheck"> >{{ '权限中心' }}</el-checkbox>
<el-checkbox v-for="item in registList" <el-checkbox-group
:key="item.value" v-model="ruleForm.centerList"
:label="item.value">{{ item.label }}</el-checkbox> @change="getCheck"
>
<el-checkbox
v-for="item in registList"
:key="item.value"
:label="item.value"
>{{ item.label }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</el-form-item> </el-form-item>
@ -105,34 +139,40 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item required <el-form-item
:label="'活动时间'" required
prop="ruleFormTime"> :label="'活动时间'"
<el-date-picker :disabled="lookOver" prop="ruleFormTime"
v-model="ruleForm.ruleFormTime" >
@change="changeTime" <el-date-picker
value-format="yyyy-MM-dd HH:mm:ss" v-model="ruleForm.ruleFormTime"
type="datetimerange" :disabled="lookOver"
:range-separator="'至'" value-format="yyyy-MM-dd HH:mm:ss"
:start-placeholder="'开始日期'" type="datetimerange"
:end-placeholder="'结束日期'"> :range-separator="'至'"
</el-date-picker> :start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
@change="changeTime"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'展示时间'" <el-form-item
prop="ruleFormTime1"> :label="'展示时间'"
<el-date-picker :disabled="lookOver" prop="ruleFormTime1"
v-model="ruleForm.ruleFormTime1" >
@change="changeTime1" <el-date-picker
value-format="yyyy-MM-dd HH:mm:ss" v-model="ruleForm.ruleFormTime1"
type="datetimerange" :disabled="lookOver"
:range-separator="'至'" value-format="yyyy-MM-dd HH:mm:ss"
:start-placeholder="'开始日期'" type="datetimerange"
:end-placeholder="'结束日期'"> :range-separator="'至'"
</el-date-picker> :start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
@change="changeTime1"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -140,17 +180,26 @@
</el-form> </el-form>
</div> </div>
<setGiftGoodsInfo v-show="tabActive==1" <setGiftGoodsInfo
ref="setGiftGoodsInfo"></setGiftGoodsInfo> v-show="tabActive==1"
ref="setGiftGoodsInfo"
/>
</div> </div>
<div class="footer" <div
v-show="controlType!=4"> v-show="controlType!=4"
<el-button size="small" class="footer"
class="cancelBtn"> {{ '取消' }}</el-button> >
<el-button size="small" <el-button
@click="submit('ruleForm')" size="small"
class="sureBtn"> {{ '确认' }}</el-button> class="cancelBtn"
@click="$router.back()"
> {{ '取消' }}</el-button>
<el-button
size="small"
class="sureBtn"
@click="submit('ruleForm')"
> {{ '确认' }}</el-button>
</div> </div>
<!-- </div> --> <!-- </div> -->
@ -170,21 +219,21 @@ export default {
Editor, Editor,
topBar, topBar,
ImageUpload, ImageUpload,
setGiftGoodsInfo, setGiftGoodsInfo
}, },
data() { data() {
return { return {
controlType:'', controlType: '',
tabActive: 0, tabActive: 0,
topList: [ topList: [
{ {
name: '基本信息', name: '基本信息',
id: 0, id: 0
}, },
{ {
name: '规则设置', name: '规则设置',
id: 1, id: 1
}, }
], ],
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload', uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
ruleForm: { ruleForm: {
@ -194,34 +243,34 @@ export default {
levelList: [], levelList: [],
realList: [], realList: [],
centerList: [], centerList: [],
goalMemberConfigList: [], goalMemberConfigList: []
}, },
rules: { rules: {
actName: [ actName: [
{ required: true, message: '请输入活动名称', trigger: 'blur' }, { required: true, message: '请输入活动名称', trigger: 'blur' }
], ],
actExplain: [ actExplain: [
{ required: true, message: '请输入活动说明', trigger: 'blur' }, { required: true, message: '请输入活动说明', trigger: 'blur' }
], ],
actCover: [ actCover: [
{ required: true, message: '请上传活动封面', trigger: 'change' }, { required: true, message: '请上传活动封面', trigger: 'change' }
], ],
goalMemberConfigList: [ goalMemberConfigList: [
{ required: true, message: '请选择目标用户群体', trigger: 'change' }, { required: true, message: '请选择目标用户群体', trigger: 'change' }
], ],
ruleFormTime: [ ruleFormTime: [
{ required: true, message: '请选择活动时间', trigger: 'change' }, { required: true, message: '请选择活动时间', trigger: 'change' }
], ],
ruleFormTime1: [ ruleFormTime1: [
{ required: true, message: '请选择展示时间', trigger: 'change' }, { required: true, message: '请选择展示时间', trigger: 'change' }
], ]
}, },
lookOver: false, lookOver: false,
gradeList: [], gradeList: [],
awardsList: [], awardsList: [],
registList: [], registList: [],
pkId: '', pkId: '',
waresConfigParam: [], waresConfigParam: []
} }
}, },
mounted() { mounted() {
@ -259,7 +308,7 @@ export default {
getDetails() { getDetails() {
api api
.activityDetails({ .activityDetails({
pkId: this.pkId, pkId: this.pkId
}) })
.then((res) => { .then((res) => {
this.waresConfigParam = res.data.waresConfigParam this.waresConfigParam = res.data.waresConfigParam
@ -274,15 +323,15 @@ export default {
this.ruleForm.disEndDate = res.data.disEndDate this.ruleForm.disEndDate = res.data.disEndDate
this.$set(this.ruleForm, 'ruleFormTime', [ this.$set(this.ruleForm, 'ruleFormTime', [
res.data.actStartDate, res.data.actStartDate,
res.data.actEndDate, res.data.actEndDate
]) ])
this.$set(this.ruleForm, 'ruleFormTime1', [ this.$set(this.ruleForm, 'ruleFormTime1', [
res.data.disStartDate, res.data.disStartDate,
res.data.disEndDate, res.data.disEndDate
]) ])
let arr1 = [], const arr1 = []
arr2 = [], const arr2 = []
arr3 = [] const arr3 = []
res.data.goalMemberConfigList.forEach((item) => { res.data.goalMemberConfigList.forEach((item) => {
if (item.memberType == 1) { if (item.memberType == 1) {
arr1.push(item.pkLevel) arr1.push(item.pkLevel)
@ -297,8 +346,8 @@ export default {
this.$set(this.ruleForm, 'centerList', arr3) this.$set(this.ruleForm, 'centerList', arr3)
this.$refs.setGiftGoodsInfo.getPage( this.$refs.setGiftGoodsInfo.getPage(
res.data.waresConfigParam || '' res.data.waresConfigParam || ''
) )
let that = this const that = this
setTimeout(() => { setTimeout(() => {
that.getCheck() that.getCheck()
}, 50) }, 50)
@ -319,15 +368,15 @@ export default {
this.ruleForm.disEndDate = this.addData.activityParam.disEndDate this.ruleForm.disEndDate = this.addData.activityParam.disEndDate
this.$set(this.ruleForm, 'ruleFormTime', [ this.$set(this.ruleForm, 'ruleFormTime', [
this.addData.activityParam.actStartDate, this.addData.activityParam.actStartDate,
this.addData.activityParam.actEndDate, this.addData.activityParam.actEndDate
]) ])
this.$set(this.ruleForm, 'ruleFormTime1', [ this.$set(this.ruleForm, 'ruleFormTime1', [
this.addData.activityParam.disStartDate, this.addData.activityParam.disStartDate,
this.addData.activityParam.disEndDate, this.addData.activityParam.disEndDate
]) ])
let arr1 = [], const arr1 = []
arr2 = [], const arr2 = []
arr3 = [] const arr3 = []
this.addData.activityParam.goalMemberConfigList.forEach((item) => { this.addData.activityParam.goalMemberConfigList.forEach((item) => {
if (item.memberType == 1) { if (item.memberType == 1) {
arr1.push(item.pkLevel) arr1.push(item.pkLevel)
@ -343,7 +392,7 @@ export default {
this.$refs.setGiftGoodsInfo.getPage( this.$refs.setGiftGoodsInfo.getPage(
this.addData.activityParam.waresConfigParam || '' this.addData.activityParam.waresConfigParam || ''
) )
let that = this const that = this
setTimeout(() => { setTimeout(() => {
that.getCheck() that.getCheck()
}, 500) }, 500)
@ -360,28 +409,28 @@ export default {
// //
// //
getCheck() { getCheck() {
let arr1 = [] const arr1 = []
let arr2 = [] const arr2 = []
let arr3 = [] const arr3 = []
// //
this.ruleForm.levelList.forEach((item) => { this.ruleForm.levelList.forEach((item) => {
arr1.push({ arr1.push({
memberType: 1, memberType: 1,
pkLevel: item, pkLevel: item
}) })
}) })
// //
this.ruleForm.realList.forEach((item) => { this.ruleForm.realList.forEach((item) => {
arr2.push({ arr2.push({
memberType: 2, memberType: 2,
pkLevel: item, pkLevel: item
}) })
}) })
// //
this.ruleForm.centerList.forEach((item) => { this.ruleForm.centerList.forEach((item) => {
arr3.push({ arr3.push({
memberType: 3, memberType: 3,
pkLevel: item, pkLevel: item
}) })
}) })
this.ruleForm.goalMemberConfigList = [...arr1, ...arr2, ...arr3] this.ruleForm.goalMemberConfigList = [...arr1, ...arr2, ...arr3]
@ -452,42 +501,53 @@ export default {
submit() { submit() {
this.$refs['ruleForm'].validate((valid) => { this.$refs['ruleForm'].validate((valid) => {
if (valid) { if (valid) {
let a = Object.assign({}, this.ruleForm, { const a = Object.assign({}, this.ruleForm, {
waresConfigParam: this.$refs.setGiftGoodsInfo.allData, waresConfigParam: this.$refs.setGiftGoodsInfo.allData
}) })
let obj = Object.assign({ const obj = Object.assign({
controlType: this.controlType, controlType: this.controlType,
activityParam: a, activityParam: a
}) })
if (this.controlType == 1) { // const approvalBusinessEnumList = [729, 730, 731]
this.$router.push({ // const approvalBusiness = approvalBusinessEnumList[this.controlType - 1]
path: 'giftGoodsZxqc', api.waresRuleConfigSubmit(obj).then((res) => {
query: { if (res.code === 200) {
data: JSON.stringify(obj), this.$message({
approvalBusiness: 729, message: res.msg || '操作成功',
}, type: 'success'
}) })
} else if (this.controlType == 2) { this.$router.back()
this.$router.push({ }
path: 'giftGoodsZxqc', })
query: { // if (this.controlType == 1) {
data: JSON.stringify(obj), // this.$router.push({
approvalBusiness: 730, // path: 'giftGoodsZxqc',
}, // query: {
}) // data: JSON.stringify(obj),
} else if (this.controlType == 3) { // approvalBusiness: 729
this.$router.push({ // }
path: 'giftGoodsZxqc', // })
query: { // } else if (this.controlType == 2) {
data: JSON.stringify(obj), // this.$router.push({
approvalBusiness: 731, // path: 'giftGoodsZxqc',
}, // query: {
}) // data: JSON.stringify(obj),
} // approvalBusiness: 730
// }
// })
// } else if (this.controlType == 3) {
// this.$router.push({
// path: 'giftGoodsZxqc',
// query: {
// data: JSON.stringify(obj),
// approvalBusiness: 731
// }
// })
// }
} }
}) })
}, }
}, }
} }
</script> </script>

View File

@ -1,541 +0,0 @@
<!--
* @Descripttion:
* @version:
* @Author: 王三华
* @Date: 2023-05-09 10:57:15
-->
<template>
<div class="page">
<topBar
v-if="topList.length > 0"
:top-list="topList"
:moren="moren"
/>
<div class="main">
<div class="thetable">
<div class="fontTitle"> {{ '在线签呈' }}</div>
<div class="titleflex">
<div>{{ '编号' }} :</div>
<div>
<el-radio-group v-model="allData.signType">
<el-radio
v-for="ctem in checkList"
:key="ctem.value"
:label="ctem.value"
>{{ ctem.label }}</el-radio>
</el-radio-group>
</div>
</div>
<table
id="tfhover"
class="tftable"
border="1"
>
<tr>
<td
colspan="1"
width="190px"
align="center"
> {{ '发起部门' }} :</td>
<td
v-if="allData.signData"
colspan="1"
width="435px"
>{{ allData.signData.deptName }}</td>
<td
colspan="1"
width="140px"
align="center"
> {{ '发起人' }} :</td>
<td
v-if="allData.signData"
colspan="1"
>{{ allData.signData.userName }}</td>
</tr>
<tr>
<td
colspan="1"
align="center"
> {{ '主旨' }} :</td>
<td
v-if="allData.signData"
colspan="1"
>{{ allData.signData.approvalBusinessVal }}</td>
<td
colspan="1"
align="center"
> {{ '日期' }} :</td>
<td
v-if="allData.signData"
colspan="1"
>{{ allData.signData.creationTime }}</td>
</tr>
<!-- // -->
<tr>
<td
colspan="1"
align="center"
> {{ '审批流程' }}</td>
<td colspan="3">
<div class="disflex">
<span
v-for="(ctem, cndex) in allData.signData.detailList"
style="margin:0 5px 5px 0"
>
<el-select
v-model="ctem.pkApprover"
filterable
size="mini"
:placeholder="'请选择'"
@change="getApprover"
>
<el-option
v-for="item in approbalList"
:key="item.userId"
:label="item.nickName + '(' +item.deptName+')'"
:value="item.userId"
/>
</el-select>
</span>
<span style="margin:0 5px 5px 0">
<i
v-show="allData.signData.detailList.length>0"
class="el-icon-remove-outline"
style="font-size:18px;margin-right:5px"
@click.stop="delData"
/>
<i
class="el-icon-circle-plus-outline"
style="font-size:18px"
@click.stop="addData"
/>
</span>
</div>
</td>
</tr>
<tr>
<td
colspan="1"
align="center"
>{{ '抄送人' }}</td>
<td colspan="3">
<div class="disflex">
<span
v-for="(ctem, cndex) in allData.signData.sendList"
style="margin:0 5px 5px 0"
>
<el-select
v-model="ctem.pkSend"
filterable
size="mini"
:placeholder="'请选择'"
@change="getApprover"
>
<el-option
v-for="item in userAllList"
:key="item.userId"
:label="item.nickName + '(' +item.deptName+')'"
:value="item.userId"
/>
</el-select>
</span>
<span style="margin:0 5px 5px 0">
<i
v-show="allData.signData.sendList.length>0"
class="el-icon-remove-outline"
style="font-size:18px;margin-right:5px"
@click.stop="delData1"
/>
<i
class="el-icon-circle-plus-outline"
style="font-size:18px"
@click.stop="addData1"
/>
</span>
</div>
</td>
</tr>
<tr>
<td
style="height: 190px"
align="center"
>{{ '情况说明' }}</td>
<td
colspan="3"
style="padding: 0"
>
<div>
<!-- <el-input type="textarea"
:rows="6"
:placeholder="'请输入'"
v-model="allData.remark">
</el-input> -->
<noImgEditor
v-model="allData.remark"
:min-height="190"
/>
</div>
</td>
</tr>
<tr>
<td
style="height: 193px"
align="center"
> {{ '业务诉求' }}</td>
<td
colspan="3"
style="padding: 0;vertical-align: top;"
>
<div>
<el-table
:data="allData.updateParentParamList"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
>
<el-table-column
v-for="ctem in allData.tableTit"
:key="ctem.value"
align="center"
:prop="ctem.value"
:label="ctem.label"
>
<template slot-scope="scope">
<div v-show="ctem.value== 'actExplain'">
<div
style="color: #48B2FD;text-decoration:underline;cursor: pointer"
@click="details"
>
{{ '查看详情' }}
</div>
</div>
<div v-show="ctem.value!= 'actExplain'">
<div>
{{ scope.row[ctem.value] }}
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
</td>
</tr>
<tr>
<td
style="height: 190px"
align="center"
>{{ '附件' }}</td>
<td
colspan="3"
style="padding: 0"
>
<div style="height: 100%;padding: 10px 20px">
<el-upload
class="upload-demo"
:action="uploadImgUrl"
:on-success="handleUploadSuccess"
:on-remove="removeFile"
multiple
:headers="headers"
:file-list="fileList"
>
<el-button
size="small"
type="primary"
>{{ '点击上传' }}</el-button>
</el-upload>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="footer">
<div style="margin: 0 auto">
<el-button
class="thebtn"
@click="cancelCz"
> {{ '取消' }}</el-button>
<el-button
type="primary"
class="thebtn"
@click="saveDate"
> {{ '确认' }}</el-button>
</div>
</div>
</div>
</template>
<script>
import topBar from '@/components/topBar'
import * as man from '@/api/manage'
import onlineSign from '../../dashboard/onlineSign.json'
import { getToken } from '@/utils/auth'
export default {
name: 'Zxqc',
components: {
topBar
},
data() {
return {
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload', //
headers: {
Authorization: getToken()
},
onlineSign,
moren: 'giftGoodsZxqc',
topList: [
{
name: '在线签呈',
path: 'giftGoodsZxqc'
}
],
checkList: [],
allData: {
remark: '',
signType: 1,
fileList: [],
signData: {
detailList: [],
sendList: []
},
approvalBusiness: ''
},
signDataList: [],
fileList: [],
approbalList: [],
//
userAllList: [],
allObj: {},
controlType: '' // 1=,2=,3=
}
},
mounted() {
//
this.allObj = JSON.parse(this.$route.query.data)
// let controlType = this.$route.query.controlType
// if (controlType == 1) {
// this.controlTypeVal = ''
// } else if (controlType == 2) {
// this.controlTypeVal = ''
// } else {
// this.controlTypeVal = ''
// }
this.allData.updateParentParamList = [this.allObj.activityParam]
//
this.allData.approvalBusiness = this.$route.query.approvalBusiness
this.getSignData([this.allData.approvalBusiness])
},
methods: {
details(code) {
this.$router.push({
path: '/marketing/giftGoods/addGiftGoodsInfo',
query: {
controlType: 4,
data: JSON.stringify(this.allObj)
}
})
},
getSignData(arr) {
man.signData(arr).then((res) => {
this.allData.signData = res.data[0]
//
this.$set(this.allData, 'signType', 1)
this.$set(this.allData, 'remark', '')
this.$set(this.allData, 'fileList', [])
// table
this.onlineSign.forEach((ctem) => {
if (this.allData.approvalBusiness == ctem.id) {
this.allData.tableTit = ctem.textList
}
})
this.$forceUpdate()
this.getApprove()
this.getSignType()
})
},
getApprove() {
//
man.approvalUser().then((res) => {
this.approbalList = res.data
})
man.userAll().then((res) => {
this.userAllList = res.data
})
},
getSignType() {
man.signType().then((res) => {
this.checkList = res.data
})
},
saveDate() {
//
this.allData.userIdList = this.allData.signData.detailList.map((item) => {
return item.pkApprover
})
this.allData.userIdList = this.allData.userIdList.filter((item) => item)
//
this.allData.sendIdList = this.allData.signData.sendList.map((item) => {
return item.pkSend
})
this.allData.sendIdList = this.allData.sendIdList.filter((item) => item)
this.allData.fileList = this.fileList.map((item) => {
return item.url
})
const obj = {
activityParam: this.allObj.activityParam,
controlType: this.allObj.controlType,
signType: this.allData.signType, //
remark: this.allData.remark, //
fileList: this.allData.fileList, // []
userIdList: this.allData.userIdList, // []
sendIdList: this.allData.sendIdList // []
}
man.waresOnline(obj).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: 'success'
})
this.$router.push({
path: '/marketing/giftGoods/giftGoodsList'
})
}
})
},
cancelCz() {
this.$router.go(-1)
},
//
getApprover() {
this.$nextTick(() => {
this.$forceUpdate()
})
},
//
addData() {
const arr = JSON.parse(JSON.stringify(this.allData.signData.detailList))
arr.push({
pkApprover: ''
})
this.$set(this.allData.signData, 'detailList', arr)
this.$forceUpdate()
},
//
addData1() {
const arr = JSON.parse(JSON.stringify(this.allData.signData.sendList))
arr.push({
pkSend: ''
})
this.$set(this.allData.signData, 'sendList', arr)
this.$forceUpdate()
},
//
delData1() {
this.allData.signData.sendList.pop()
this.$forceUpdate()
},
//
delData() {
this.allData.signData.detailList.pop()
this.$forceUpdate()
},
handleUploadSuccess(res) {
if (res.code == 200) {
this.fileList.push(res.data)
} else {
this.$message({
type: 'error',
message: '上传失败'
})
}
},
removeFile(file, fileList) {
this.fileList.forEach((item, index) => {
if (file.uid == item.uid) {
this.fileList.splice(index, 1)
}
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-table thead {
color: #000000;
}
.page {
padding: 20px;
background: #f9f9f9;
font-size: 14px;
.main {
// margin-top: 20px;
background: #ffffff;
border-radius: 8px;
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
display: flex;
margin: 0 auto;
width: 100%;
padding: 20px;
flex-direction: column;
}
.thetable {
margin: 0 auto;
margin-bottom: 20px;
.fontTitle {
font-weight: bold;
font-size: 24px;
text-align: center;
}
.titleflex {
display: flex;
margin-top: 10px;
margin-bottom: 10px;
justify-content: space-between;
}
}
.tftable {
font-size: 14px;
border-collapse: collapse;
border-radius: 10px;
width: 1060px;
border: 1px solid #cccccc;
.spbox {
display: flex;
align-items: center;
justify-content: flex-end;
}
th {
font-size: 14px;
// padding: 20px;
}
tr td {
font-size: 14px;
padding: 10px 20px;
height: 60px;
}
}
.footer {
display: flex;
justify-content: center;
align-items: center;
padding: 15px 0;
.thebtn {
width: 120px;
height: 38px;
}
}
}
//
.disflex {
display: flex;
align-items: center;
flex-wrap: wrap;
}
</style>

View File

@ -162,7 +162,7 @@
/> />
</div> </div>
<div v-show="controlType != 4" class="footer"> <div v-show="controlType != 4" class="footer">
<el-button size="small" class="cancelBtn"> <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" @click="submit('ruleForm')">
{{ '确认' }}</el-button> {{ '确认' }}</el-button>
@ -477,32 +477,40 @@ export default {
mcrList: this.$refs.setConsumptionInfo.mcrList mcrList: this.$refs.setConsumptionInfo.mcrList
} }
) )
console.log(obj, '111111111111111111111') api.memberConsumeRuleSubmit(obj).then((res) => {
if (this.controlType == 1) { if (res.code === 200) {
this.$router.push({ this.$message({
path: 'memberConsumptionGiftZxqc', message: res.msg || '操作成功',
query: { type: 'success'
data: JSON.stringify(obj), })
approvalBusiness: 749 this.$router.back()
} }
}) })
} else if (this.controlType == 2) { // if (this.controlType == 1) {
this.$router.push({ // this.$router.push({
path: 'memberConsumptionGiftZxqc', // path: 'memberConsumptionGiftZxqc',
query: { // query: {
data: JSON.stringify(obj), // data: JSON.stringify(obj),
approvalBusiness: 750 // approvalBusiness: 749
} // }
}) // })
} else if (this.controlType == 3) { // } else if (this.controlType == 2) {
this.$router.push({ // this.$router.push({
path: 'memberConsumptionGiftZxqc', // path: 'memberConsumptionGiftZxqc',
query: { // query: {
data: JSON.stringify(obj), // data: JSON.stringify(obj),
approvalBusiness: 751 // approvalBusiness: 750
} // }
}) // })
} // } else if (this.controlType == 3) {
// this.$router.push({
// path: 'memberConsumptionGiftZxqc',
// query: {
// data: JSON.stringify(obj),
// approvalBusiness: 751
// }
// })
// }
} }
}) })
} }

View File

@ -1,487 +0,0 @@
<template>
<div class="page">
<topBar
v-if="topList.length > 0"
:top-list="topList"
:moren="moren"
/>
<div class="main">
<div class="thetable">
<div class="fontTitle">{{ '在线签呈' }}</div>
<div class="titleflex">
<div>{{ '编号' }} :</div>
<div>
<el-radio-group v-model="allData.signType">
<el-radio
v-for="ctem in checkList"
:key="ctem.value"
:label="ctem.value"
>{{ ctem.label }}</el-radio>
</el-radio-group>
</div>
</div>
<table id="tfhover" class="tftable" border="1">
<tr>
<td colspan="1" width="190px" align="center">
{{ '发起部门' }} :
</td>
<td v-if="allData.signData" colspan="1" width="435px">
{{ allData.signData.deptName }}
</td>
<td colspan="1" width="140px" align="center">
{{ '发起人' }} :
</td>
<td v-if="allData.signData" colspan="1">
{{ allData.signData.userName }}
</td>
</tr>
<tr>
<td colspan="1" align="center">{{ '主旨' }} :</td>
<td v-if="allData.signData" colspan="1">
{{ allData.signData.approvalBusinessVal }}
</td>
<td colspan="1" align="center">{{ '日期' }} :</td>
<td v-if="allData.signData" colspan="1">
{{ allData.signData.creationTime }}
</td>
</tr>
<!-- // -->
<tr>
<td colspan="1" align="center">{{ '审批流程' }}</td>
<td colspan="3">
<div class="disflex">
<span
v-for="(ctem, cndex) in allData.signData.detailList"
style="margin: 0 5px 5px 0"
>
<el-select
v-model="ctem.pkApprover"
filterable
size="mini"
:placeholder="'请选择'"
@change="getApprover"
>
<el-option
v-for="item in approbalList"
:key="item.userId"
:label="item.nickName + '(' + item.deptName + ')'"
:value="item.userId"
/>
</el-select>
</span>
<span style="margin: 0 5px 5px 0">
<i
v-show="allData.signData.detailList.length > 0"
class="el-icon-remove-outline"
style="font-size: 18px; margin-right: 5px"
@click.stop="delData"
/>
<i
class="el-icon-circle-plus-outline"
style="font-size: 18px"
@click.stop="addData"
/>
</span>
</div>
</td>
</tr>
<tr>
<td colspan="1" align="center">{{ '抄送人' }}</td>
<td colspan="3">
<div class="disflex">
<span
v-for="(ctem, cndex) in allData.signData.sendList"
style="margin: 0 5px 5px 0"
>
<el-select
v-model="ctem.pkSend"
filterable
size="mini"
:placeholder="'请选择'"
@change="getApprover"
>
<el-option
v-for="item in userAllList"
:key="item.userId"
:label="item.nickName + '(' + item.deptName + ')'"
:value="item.userId"
/>
</el-select>
</span>
<span style="margin: 0 5px 5px 0">
<i
v-show="allData.signData.sendList.length > 0"
class="el-icon-remove-outline"
style="font-size: 18px; margin-right: 5px"
@click.stop="delData1"
/>
<i
class="el-icon-circle-plus-outline"
style="font-size: 18px"
@click.stop="addData1"
/>
</span>
</div>
</td>
</tr>
<tr>
<td style="height: 190px" align="center">{{ '情况说明' }}</td>
<td colspan="3" style="padding: 0">
<div>
<!-- <el-input type="textarea"
:rows="6"
:placeholder="'请输入'"
v-model="allData.remark">
</el-input> -->
<noImgEditor v-model="allData.remark" :min-height="190" />
</div>
</td>
</tr>
<tr>
<td style="height: 193px" align="center">{{ '业务诉求' }}</td>
<td colspan="3" style="padding: 0; vertical-align: top">
<div>
<el-table
:data="allData.updateParentParamList"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
>
<el-table-column
v-for="ctem in allData.tableTit"
:key="ctem.value"
align="center"
:prop="ctem.value"
:label="ctem.label"
>
<template slot-scope="scope">
<div v-show="ctem.value == 'actExplain'">
<div
style="
color: #48b2fd;
text-decoration: underline;
cursor: pointer;
"
@click="details"
>
{{ '查看详情' }}
</div>
</div>
<div v-show="ctem.value != 'actExplain'">
<div>
{{ scope.row[ctem.value] }}
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
</td>
</tr>
<tr>
<td style="height: 190px" align="center">{{ '附件' }}</td>
<td colspan="3" style="padding: 0">
<div style="height: 100%; padding: 10px 20px">
<el-upload
class="upload-demo"
:action="uploadImgUrl"
:on-success="handleUploadSuccess"
:on-remove="removeFile"
multiple
:headers="headers"
:file-list="fileList"
>
<el-button size="small" type="primary">{{
'点击上传'
}}</el-button>
</el-upload>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="footer">
<div style="margin: 0 auto">
<el-button class="thebtn" @click="cancelCz">
{{ '取消' }}</el-button>
<el-button type="primary" class="thebtn" @click="saveDate">
{{ '确认' }}</el-button>
</div>
</div>
</div>
</template>
<script>
import topBar from '@/components/topBar'
import * as man from '@/api/manage'
import onlineSign from '../../dashboard/onlineSign.json'
import { getToken } from '@/utils/auth'
export default {
name: 'Zxqc',
components: {
topBar
},
data() {
return {
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload', //
headers: {
Authorization: getToken()
},
onlineSign,
moren: 'memberConsumptionGiftZxqc',
topList: [
{
name: '在线签呈',
path: 'memberConsumptionGiftZxqc'
}
],
checkList: [],
allData: {
remark: '',
signType: 1,
fileList: [],
signData: {
detailList: [],
sendList: []
},
approvalBusiness: ''
},
signDataList: [],
fileList: [],
approbalList: [],
//
userAllList: [],
allObj: {},
controlType: '' // 1=,2=,3=
}
},
mounted() {
//
this.allObj = JSON.parse(this.$route.query.data)
// let controlType = this.$route.query.controlType
// if (controlType == 1) {
// this.controlTypeVal = ''
// } else if (controlType == 2) {
// this.controlTypeVal = ''
// } else {
// this.controlTypeVal = ''
// }
this.allData.updateParentParamList = [this.allObj.activityParam]
//
this.allData.approvalBusiness = this.$route.query.approvalBusiness
this.getSignData([this.allData.approvalBusiness])
},
methods: {
details(code) {
this.$router.push({
path: 'memberAddConsumptionInfo',
query: {
controlType: 4,
data: JSON.stringify(this.allObj)
}
})
},
getSignData(arr) {
man.signData(arr).then((res) => {
this.allData.signData = res.data[0]
//
this.$set(this.allData, 'signType', 1)
this.$set(this.allData, 'remark', '')
this.$set(this.allData, 'fileList', [])
// table
this.onlineSign.forEach((ctem) => {
if (this.allData.approvalBusiness == ctem.id) {
this.allData.tableTit = ctem.textList
}
})
this.$forceUpdate()
this.getApprove()
this.getSignType()
})
},
getApprove() {
//
man.approvalUser().then((res) => {
this.approbalList = res.data
})
man.userAll().then((res) => {
this.userAllList = res.data
})
},
getSignType() {
man.signType().then((res) => {
this.checkList = res.data
})
},
saveDate() {
//
this.allData.userIdList = this.allData.signData.detailList.map((item) => {
return item.pkApprover
})
this.allData.userIdList = this.allData.userIdList.filter((item) => item)
//
this.allData.sendIdList = this.allData.signData.sendList.map((item) => {
return item.pkSend
})
this.allData.sendIdList = this.allData.sendIdList.filter((item) => item)
this.allData.fileList = this.fileList.map((item) => {
return item.url
})
const obj = {
activityParam: this.allObj.activityParam,
mcrList: this.allObj.mcrList,
controlType: this.allObj.controlType,
signType: this.allData.signType, //
remark: this.allData.remark, //
fileList: this.allData.fileList, // []
userIdList: this.allData.userIdList, // []
sendIdList: this.allData.sendIdList // []
}
man.consumeOnlinePetition(obj).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: 'success'
})
this.$router.push({
path: 'memberConsumptionGiftList'
})
}
})
},
cancelCz() {
this.$router.go(-1)
},
//
getApprover() {
this.$nextTick(() => {
this.$forceUpdate()
})
},
//
addData() {
const arr = JSON.parse(JSON.stringify(this.allData.signData.detailList))
arr.push({
pkApprover: ''
})
this.$set(this.allData.signData, 'detailList', arr)
this.$forceUpdate()
},
//
addData1() {
const arr = JSON.parse(JSON.stringify(this.allData.signData.sendList))
arr.push({
pkSend: ''
})
this.$set(this.allData.signData, 'sendList', arr)
this.$forceUpdate()
},
//
delData1() {
this.allData.signData.sendList.pop()
this.$forceUpdate()
},
//
delData() {
this.allData.signData.detailList.pop()
this.$forceUpdate()
},
handleUploadSuccess(res) {
if (res.code == 200) {
this.fileList.push(res.data)
} else {
this.$message({
type: 'error',
message: '上传失败'
})
}
},
removeFile(file, fileList) {
this.fileList.forEach((item, index) => {
if (file.uid == item.uid) {
this.fileList.splice(index, 1)
}
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-table thead {
color: #000000;
}
.page {
padding: 20px;
background: #f9f9f9;
font-size: 14px;
.main {
// margin-top: 20px;
background: #ffffff;
border-radius: 8px;
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
display: flex;
margin: 0 auto;
width: 100%;
padding: 20px;
flex-direction: column;
}
.thetable {
margin: 0 auto;
margin-bottom: 20px;
.fontTitle {
font-weight: bold;
font-size: 24px;
text-align: center;
}
.titleflex {
display: flex;
margin-top: 10px;
margin-bottom: 10px;
justify-content: space-between;
}
}
.tftable {
font-size: 14px;
border-collapse: collapse;
border-radius: 10px;
width: 1060px;
border: 1px solid #cccccc;
.spbox {
display: flex;
align-items: center;
justify-content: flex-end;
}
th {
font-size: 14px;
// padding: 20px;
}
tr td {
font-size: 14px;
padding: 10px 20px;
height: 60px;
}
}
.footer {
display: flex;
justify-content: center;
align-items: center;
padding: 15px 0;
.thebtn {
width: 120px;
height: 38px;
}
}
}
//
.disflex {
display: flex;
align-items: center;
flex-wrap: wrap;
}
</style>