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

This commit is contained in:
woody 2025-06-30 13:42:35 +08:00
commit e118af8685
13 changed files with 714 additions and 1273 deletions

View File

@ -1606,7 +1606,7 @@ export const constantRoutes = [
path: 'fdfh', path: 'fdfh',
name: 'CoachingDividends', name: 'CoachingDividends',
component: () => import('@/views/configManage/bonus/fdfh'), component: () => import('@/views/configManage/bonus/fdfh'),
meta: { title: '辅导分红', icon: 'table' }, meta: { title: '培育津贴', icon: 'table' },
hidden: true hidden: true
}, },

View File

@ -2,9 +2,9 @@
<div class="page"> <div class="page">
<topBar <topBar
v-if="topList.length > 0" v-if="topList.length > 0"
:topList="topList" :top-list="topList"
:moren="moren" :moren="moren"
></topBar> />
<div class="main"> <div class="main">
<div class="maintable"> <div class="maintable">
<el-table <el-table
@ -18,22 +18,23 @@
align="center" align="center"
prop="awardsName" prop="awardsName"
:label="'真实奖衔'" :label="'真实奖衔'"
> />
</el-table-column> <el-table-column align="center" prop="coachAlgebra" :label="'培育代数'">
<el-table-column align="center" prop="coachAlgebra" :label="'辅导代数'">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input clearable <el-input
:disabled="ifupdate"
v-model="scope.row.coachAlgebra" v-model="scope.row.coachAlgebra"
></el-input> clearable
:disabled="ifupdate"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="coachRatio" :label="'辅导比例' +'(%)'"> <el-table-column align="center" prop="coachRatio" :label="'培育津贴比例' +'(%)'">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input clearable <el-input
:disabled="ifupdate"
v-model="scope.row.coachRatio" v-model="scope.row.coachRatio"
></el-input> clearable
:disabled="ifupdate"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -42,10 +43,11 @@
:label="'分红比例' +'(%)'" :label="'分红比例' +'(%)'"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input clearable <el-input
:disabled="ifupdate"
v-model="scope.row.abonusRatio" v-model="scope.row.abonusRatio"
></el-input> clearable
:disabled="ifupdate"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -53,9 +55,10 @@
</div> </div>
<div class="footer"> <div class="footer">
<div style="margin: 0 auto"> <div style="margin: 0 auto">
<el-button class="thebtn btn1" @click="ifupdate = false" <el-button
>{{'修改'}}</el-button class="thebtn btn1"
> @click="ifupdate = false"
>{{ '修改' }}</el-button>
<el-button class="thebtn btn2" @click="savedate">{{ '保存' }}</el-button> <el-button class="thebtn btn2" @click="savedate">{{ '保存' }}</el-button>
</div> </div>
</div> </div>
@ -63,97 +66,59 @@
</template> </template>
<script> <script>
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import { getcoachBonusList, updateCoachBonus } from "@/api/bonus"; import { getcoachBonusList, updateCoachBonus } from '@/api/bonus'
import { mixin } from './mixins'
export default { export default {
name: "Fdfh", name: 'Fdfh',
components: { components: {
topBar, topBar
}, },
mixins: [mixin],
data() { data() {
return { return {
moren: "fdfh", moren: 'fdfh',
topList: [
{
name: '奖项配置',
path: "bonus",
},
{
name: '直推配置',
path: "ztpz",
},
{
name: '拓展配置',
path: "kzpz",
},
{
name: '辅导分红',
path: "fdfh",
},
{
name: '服务补贴',
path: "fwbt",
},
{
name: '奖金扣项',
path: "jjkx",
},
{
name: '云代配置',
path: "ydpz",
},
{
name: '环球积分',
path: "hqjf",
},
{
name: '车奖积分',
path: "njjf",
},
],
tableData: [], tableData: [],
ifupdate: true, ifupdate: true
}; }
}, },
created() { created() {
this.getcoachBonusList(); this.getcoachBonusList()
}, },
methods: { methods: {
getcoachBonusList() { getcoachBonusList() {
getcoachBonusList().then((res) => { getcoachBonusList().then((res) => {
this.tableData = res.rows; this.tableData = res.rows
}); })
}, },
// //
savedate() { savedate() {
this.ifupdate = true; this.ifupdate = true
updateCoachBonus({ awardsList: this.tableData }).then((res) => { updateCoachBonus({ awardsList: this.tableData }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "warning", type: 'warning'
}); })
} }
this.getcoachBonusList(); this.getcoachBonusList()
}); })
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "warning-row"; return 'warning-row'
} else if (rowIndex % 2 == 0) { } else if (rowIndex % 2 == 0) {
return "success-row"; return 'success-row'
}
return ''
}
}
} }
return "";
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -2,9 +2,9 @@
<div class="page"> <div class="page">
<topBar <topBar
v-if="topList.length > 0" v-if="topList.length > 0"
:topList="topList" :top-list="topList"
:moren="moren" :moren="moren"
></topBar> />
<div class="main"> <div class="main">
<div class="maintable"> <div class="maintable">
<el-table <el-table
@ -19,8 +19,7 @@
:formatter="checkTypeList" :formatter="checkTypeList"
prop="serviceType" prop="serviceType"
:label="'服务类型'" :label="'服务类型'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="serviceRadio" prop="serviceRadio"
@ -28,11 +27,11 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.serviceRadio"
clearable clearable
class="theinput" class="theinput"
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.serviceRadio" />
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -42,16 +41,16 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-select <el-select
v-model="scope.row.assessmentType"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.assessmentType"
> >
<el-option <el-option
v-for="item in ssessmentTypeList" v-for="item in ssessmentTypeList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
@ -72,131 +71,93 @@
</template> </template>
<script> <script>
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import { import {
getServiceList, getServiceList,
updateService, updateService,
getServiceTypeList, getServiceTypeList,
getAssessmentType, getAssessmentType
} from "@/api/bonus"; } from '@/api/bonus'
import { mixin } from './mixins'
export default { export default {
name: "Fwbt", name: 'Fwbt',
components: { components: {
topBar, topBar
}, },
mixins: [mixin],
data() { data() {
return { return {
moren: "fwbt", moren: 'fwbt',
topList: [
{
name: '奖项配置',
path: "bonus",
},
{
name: '直推配置',
path: "ztpz",
},
{
name: '拓展配置',
path: "kzpz",
},
{
name: '辅导分红',
path: "fdfh",
},
{
name: '服务补贴',
path: "fwbt",
},
{
name: '奖金扣项',
path: "jjkx",
},
{
name: '云代配置',
path: "ydpz",
},
{
name: '环球积分',
path: "hqjf",
},
{
name: '车奖积分',
path: "njjf",
},
],
tableData: [ tableData: [
{ {
name: "asads", name: 'asads',
put: 2, put: 2
}, }
], ],
ifupdate: true, ifupdate: true,
serviceTypeList: [], serviceTypeList: [],
ssessmentTypeList: [], ssessmentTypeList: []
}; }
}, },
created() { created() {
this.getServiceList(); this.getServiceList()
this.getServiceTypeList(); this.getServiceTypeList()
}, },
methods: { methods: {
// //
getServiceList() { getServiceList() {
getServiceList().then((res) => { getServiceList().then((res) => {
this.tableData = res.rows; this.tableData = res.rows
}); })
}, },
// //
getServiceTypeList() { getServiceTypeList() {
getServiceTypeList().then((res) => { getServiceTypeList().then((res) => {
this.serviceTypeList = res.data; this.serviceTypeList = res.data
}); })
// //
getAssessmentType().then((res) => { getAssessmentType().then((res) => {
this.ssessmentTypeList = res.data; this.ssessmentTypeList = res.data
}); })
}, },
// //
checkTypeList(row) { checkTypeList(row) {
let state = ""; let state = ''
this.serviceTypeList.forEach((item) => { this.serviceTypeList.forEach((item) => {
if (item.value == row.serviceType) { if (item.value == row.serviceType) {
state = item.label; state = item.label
} }
}); })
return state; return state
}, },
// //
savedate() { savedate() {
this.ifupdate = true; this.ifupdate = true
updateService({ bdBonusServiceList: this.tableData }).then((res) => { updateService({ bdBonusServiceList: this.tableData }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "warning", type: 'warning'
}); })
} }
this.getServiceList(); this.getServiceList()
}); })
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "warning-row"; return 'warning-row'
} else if (rowIndex % 2 == 0) { } else if (rowIndex % 2 == 0) {
return "success-row"; return 'success-row'
}
return ''
}
}
} }
return "";
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -2,9 +2,9 @@
<div class="page"> <div class="page">
<topBar <topBar
v-if="topList.length > 0" v-if="topList.length > 0"
:topList="topList" :top-list="topList"
:moren="moren" :moren="moren"
></topBar> />
<div class="main"> <div class="main">
<div class="maintable"> <div class="maintable">
<el-table <el-table
@ -13,11 +13,10 @@
:header-cell-style="{ background: '#EEEEEE' }" :header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
> >
<el-table-column width="200px" align="center" prop="awardsName" :label="'真实奖衔'"> <el-table-column width="200px" align="center" prop="awardsName" :label="'真实奖衔'" />
</el-table-column>
<el-table-column align="center" prop="globalIntegral" :label="'环球比例' +'(%)'"> <el-table-column align="center" prop="globalIntegral" :label="'环球比例' +'(%)'">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input clearable :disabled="ifupdate" v-model="scope.row.globalIntegral"></el-input> <el-input v-model="scope.row.globalIntegral" clearable :disabled="ifupdate" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -33,58 +32,21 @@
</template> </template>
<script> <script>
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import { getintegralList, updategLobalIntegral } from '@/api/bonus' import { getintegralList, updategLobalIntegral } from '@/api/bonus'
import { mixin } from './mixins'
export default { export default {
name: "Hqjf", name: 'Hqjf',
components: { components: {
topBar, topBar
}, },
mixins: [mixin],
data() { data() {
return { return {
moren: "hqjf", moren: 'hqjf',
topList: [
{
name: '奖项配置',
path: "bonus",
},
{
name: '直推配置',
path: "ztpz",
},
{
name: '拓展配置',
path: "kzpz",
},
{
name: '辅导分红',
path: "fdfh",
},
{
name: '服务补贴',
path: "fwbt",
},
{
name: '奖金扣项',
path: "jjkx",
},
{
name: '云代配置',
path: "ydpz",
},
{
name: '环球积分',
path: "hqjf",
},
{
name: '车奖积分',
path: "njjf",
},
],
tableData: [], tableData: [],
ifupdate:true, ifupdate: true
}; }
}, },
created() { created() {
this.getintegralList() this.getintegralList()
@ -102,29 +64,27 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "warning", type: 'warning'
}); })
} }
this.getintegralList() this.getintegralList()
}) })
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "warning-row"; return 'warning-row'
} else if (rowIndex % 2 == 0) { } else if (rowIndex % 2 == 0) {
return "success-row"; return 'success-row'
}
return ''
}
}
} }
return "";
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -3,81 +3,77 @@
<div class="page"> <div class="page">
<topBar <topBar
v-if="topList.length > 0" v-if="topList.length > 0"
:topList="topList" :top-list="topList"
:moren="moren" :moren="moren"
></topBar> />
<div class="main"> <div class="main">
<div class="maintop"> <div class="maintop">
<div class="mainbtn"> <div class="mainbtn">
<el-button size="mini" class="thebtn1" @click="adddate" <el-button
> {{ '生成' }}</el-button size="mini"
> class="thebtn1"
@click="adddate"
> {{ '生成' }}</el-button>
<el-button size="mini" class="thebtn2" @click="handleExport"> {{ '导出' }}</el-button> <el-button size="mini" class="thebtn2" @click="handleExport"> {{ '导出' }}</el-button>
</div> </div>
<div class="maintitle">{{ '基于报单时间,往后延期天数' }}</div> <div class="maintitle">{{ '基于报单时间,往后延期天数' }}</div>
</div> </div>
<div class="maintable"> <div class="maintable">
<el-table <el-table
v-loading="loading"
height="750px" height="750px"
:data="tableData" :data="tableData"
v-loading="loading"
style="width: 100%" style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }" :header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55"> </el-table-column> <el-table-column type="selection" width="55" />
<el-table-column <el-table-column
align="center" align="center"
prop="bonusName" prop="bonusName"
:label="'奖项名称'" :label="'奖项名称'"
width="180" width="180"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="settleType2" prop="settleType2"
:label="'结算周期'" :label="'结算周期'"
width="180" width="180"
> />
</el-table-column> <el-table-column align="center" prop="publishTime" :label="'公布时间'" />
<el-table-column align="center" prop="publishTime" :label="'公布时间'">
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="publishDate2" prop="publishDate2"
:label="'公布日期(天)'" :label="'公布日期(天)'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="grantDate2" prop="grantDate2"
:label="'发放日期(天)'" :label="'发放日期(天)'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="withdrawalDate2" prop="withdrawalDate2"
:label="'可提现日期(天)'" :label="'可提现日期(天)'"
> />
</el-table-column>
<el-table-column align="center" prop="time" :label="'操作'" fixed="right"> <el-table-column align="center" prop="time" :label="'操作'" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@click.native.prevent="update(scope.row)"
type="text" type="text"
size="small" size="small"
class="button-s" class="button-s"
style="color:#6962F6" style="color:#6962F6"
@click.native.prevent="update(scope.row)"
> >
{{ '修改' }} {{ '修改' }}
</el-button> </el-button>
<el-button <el-button
class="button-s" class="button-s"
@click.native.prevent="deleteRow(scope.row)"
type="text" type="text"
size="small" size="small"
style="color: #c73030" style="color: #c73030"
@click.native.prevent="deleteRow(scope.row)"
> >
{{ '删除' }} {{ '删除' }}
</el-button> </el-button>
@ -104,21 +100,22 @@
<el-row style="display: flex;justify-content:space-between "> <el-row style="display: flex;justify-content:space-between ">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="'奖项名称'" prop="bonusName"> <el-form-item :label="'奖项名称'" prop="bonusName">
<el-input clearable <el-input
v-model="form.bonusName" v-model="form.bonusName"
clearable
:placeholder="'请输入奖项名称'" :placeholder="'请输入奖项名称'"
></el-input> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="'结算周期'" prop="settleType"> <el-form-item :label="'结算周期'" prop="settleType">
<el-select clearable v-model="form.settleType" :placeholder="'请选择结算周期'"> <el-select v-model="form.settleType" clearable :placeholder="'请选择结算周期'">
<el-option <el-option
v-for="item in settleList" v-for="item in settleList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -130,14 +127,14 @@
v-model="form.publishTime" v-model="form.publishTime"
:placeholder="'请选择公布时间'" :placeholder="'请选择公布时间'"
value-format="HH:mm:ss" value-format="HH:mm:ss"
> />
</el-time-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="'公布日期(天)'" prop="publishDate"> <el-form-item :label="'公布日期(天)'" prop="publishDate">
<el-select clearable <el-select
v-model="form.publishDate" v-model="form.publishDate"
clearable
:placeholder="'请选择公布日期(天)'" :placeholder="'请选择公布日期(天)'"
> >
<el-option <el-option
@ -145,7 +142,7 @@
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -153,8 +150,9 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="'发布日期(天)'" prop="grantDate"> <el-form-item :label="'发布日期(天)'" prop="grantDate">
<el-select clearable <el-select
v-model="form.grantDate" v-model="form.grantDate"
clearable
:placeholder="'请选择发布日期(天)'" :placeholder="'请选择发布日期(天)'"
> >
<el-option <el-option
@ -162,14 +160,15 @@
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="'可提现日期(天)'" prop="withdrawalDate"> <el-form-item :label="'可提现日期(天)'" prop="withdrawalDate">
<el-select clearable <el-select
v-model="form.withdrawalDate" v-model="form.withdrawalDate"
clearable
:placeholder="'请选择可提现日期(天)'" :placeholder="'请选择可提现日期(天)'"
> >
<el-option <el-option
@ -177,7 +176,7 @@
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -192,7 +191,7 @@
</template> </template>
<script> <script>
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import { import {
getbonusList, getbonusList,
deletebonusList, deletebonusList,
@ -200,55 +199,18 @@ import {
scBonusList, scBonusList,
updateBonus, updateBonus,
getsettlement, getsettlement,
getPublishDate, getPublishDate
} from "@/api/bonus"; } from '@/api/bonus'
import { mixin } from './mixins'
export default { export default {
name: "Bonus", name: 'Bonus',
components: { components: {
topBar, topBar
}, },
mixins: [mixin],
data() { data() {
return { return {
moren: "bonus", moren: 'bonus',
topList: [
{
name: '奖项配置',
path: "bonus",
},
{
name: '直推配置',
path: "ztpz",
},
{
name: '拓展配置',
path: "kzpz",
},
{
name: '辅导分红',
path: "fdfh",
},
{
name: '服务补贴',
path: "fwbt",
},
{
name: '奖金扣项',
path: "jjkx",
},
{
name: '云代配置',
path: "ydpz",
},
{
name: '环球积分',
path: "hqjf",
},
{
name: '车奖积分',
path: "njjf",
},
],
tableData: [], tableData: [],
loading: false, loading: false,
multipleSelection: [], multipleSelection: [],
@ -256,25 +218,25 @@ export default {
total: 0, total: 0,
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50
}, },
settleList: [], // settleList: [], //
publishDate: [], // publishDate: [], //
form: { form: {
bonusName: "", // bonusName: '', //
settleType: "", // settleType: '', //
publishTime: "", // publishTime: '', //
publishDate: "", //() publishDate: '', // ()
grantDate: "", //() grantDate: '', // ()
withdrawalDate: "", //() withdrawalDate: '' // ()
}, },
rules: {}, rules: {}
}; }
}, },
created() { created() {
this.getbonusList(); this.getbonusList()
this.getsettlement(); this.getsettlement()
this.getPublishDate(); this.getPublishDate()
}, },
methods: { methods: {
/** 导出按钮操作 */ /** 导出按钮操作 */
@ -282,7 +244,7 @@ export default {
this.$confirm('是否确认导出所有数据项?', '警告', { this.$confirm('是否确认导出所有数据项?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}).then((_) => { }).then((_) => {
this.download( this.download(
'/system/manage/bd-bonus-items/export', '/system/manage/bd-bonus-items/export',
@ -294,14 +256,14 @@ export default {
// //
getPublishDate() { getPublishDate() {
getPublishDate().then((res) => { getPublishDate().then((res) => {
this.publishDate = res.data; this.publishDate = res.data
}); })
}, },
// //
getsettlement() { getsettlement() {
getsettlement().then((res) => { getsettlement().then((res) => {
this.settleList = res.data; this.settleList = res.data
}); })
}, },
// //
onSubmit(formName) { onSubmit(formName) {
@ -310,38 +272,38 @@ export default {
// //
updateBonus(this.form).then((res) => { updateBonus(this.form).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.updateShow = false; this.updateShow = false
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
this.getbonusList(); this.getbonusList()
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "warning", type: 'warning'
}); })
} }
}); })
} else { } else {
return false; return false
} }
}); })
}, },
// //
adddate() { adddate() {
scBonusList({}).then((res) => { scBonusList({}).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getbonusList(); this.getbonusList()
} }
}); })
}, },
// //
update(row) { update(row) {
this.updateShow = true; this.updateShow = true
getOneBounsList(row.pkId).then((res) => { getOneBounsList(row.pkId).then((res) => {
this.form = res.data; this.form = res.data
}); })
}, },
// //
getbonusList() { getbonusList() {
@ -350,33 +312,33 @@ export default {
res.rows.forEach((element) => { res.rows.forEach((element) => {
this.settleList.forEach((item) => { this.settleList.forEach((item) => {
if (element.settleType == item.value) { if (element.settleType == item.value) {
element.settleType2 = item.label; element.settleType2 = item.label
} }
}); })
this.publishDate.forEach((child) => { this.publishDate.forEach((child) => {
if (element.publishDate == child.value) { if (element.publishDate == child.value) {
element.publishDate2 = child.label; element.publishDate2 = child.label
} }
if (element.grantDate == child.value) { if (element.grantDate == child.value) {
element.grantDate2 = child.label; element.grantDate2 = child.label
} }
if (element.withdrawalDate == child.value) { if (element.withdrawalDate == child.value) {
element.withdrawalDate2 = child.label; element.withdrawalDate2 = child.label
} }
}); })
}); })
this.tableData = res.rows; this.tableData = res.rows
this.total = res.total; this.total = res.total
this.loading = false this.loading = false
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val
}, },
handleClose() { handleClose() {
this.updateShow = false; this.updateShow = false
this.$refs["form"].clearValidate(); this.$refs['form'].clearValidate()
this.$refs["form"].resetFields(); this.$refs['form'].resetFields()
}, },
// //
deleteRow(row) { deleteRow(row) {
@ -385,23 +347,23 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
this.getbonusList(); this.getbonusList()
} }
}); })
}); })
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "warning-row"; return 'warning-row'
} else if (rowIndex % 2 == 0) { } else if (rowIndex % 2 == 0) {
return "success-row"; return 'success-row'
}
return ''
}
}
} }
return "";
},
},
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.el-date-editor.el-input, .el-date-editor.el-input__inner{ .el-date-editor.el-input, .el-date-editor.el-input__inner{

View File

@ -2,9 +2,9 @@
<div class="page"> <div class="page">
<topBar <topBar
v-if="topList.length > 0" v-if="topList.length > 0"
:topList="topList" :top-list="topList"
:moren="moren" :moren="moren"
></topBar> />
<div class="main"> <div class="main">
<div class="maintable"> <div class="maintable">
<el-table <el-table
@ -19,31 +19,31 @@
align="center" align="center"
prop="bonusName" prop="bonusName"
:label="'奖金名称'" :label="'奖金名称'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="backRatio" prop="backRatio"
:label="'重复消费'+'(%)'" :label="'重复消费'+'(%)'"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input clearable <el-input
:disabled="ifupdate"
v-model="scope.row.backRatio" v-model="scope.row.backRatio"
></el-input> clearable
:disabled="ifupdate"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="platformRatio" prop="platformRatio"
:label="'平台消费'+'(%)'" :label="'平台消费'+'(%)'"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input clearable <el-input
:disabled="ifupdate"
v-model="scope.row.platformRatio" v-model="scope.row.platformRatio"
></el-input> clearable
:disabled="ifupdate"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -51,9 +51,10 @@
</div> </div>
<div class="footer"> <div class="footer">
<div style="margin: 0 auto"> <div style="margin: 0 auto">
<el-button class="thebtn btn1" @click="ifupdate = false" <el-button
> {{ '修改' }}</el-button class="thebtn btn1"
> @click="ifupdate = false"
> {{ '修改' }}</el-button>
<el-button class="thebtn btn2" @click="savedate">{{ '保存' }}</el-button> <el-button class="thebtn btn2" @click="savedate">{{ '保存' }}</el-button>
</div> </div>
</div> </div>
@ -61,69 +62,31 @@
</template> </template>
<script> <script>
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import { getDeductList, updateDeduct, getDeductTypeList } from "@/api/bonus"; import { getDeductList, updateDeduct, getDeductTypeList } from '@/api/bonus'
import { mixin } from './mixins'
export default { export default {
name: "Jjkx", name: 'Jjkx',
components: { components: {
topBar, topBar
}, },
mixins: [mixin],
data() { data() {
return { return {
moren: "jjkx", moren: 'jjkx',
topList: [
{
name: '奖项配置',
path: "bonus",
},
{
name: '直推配置',
path: "ztpz",
},
{
name: '拓展配置',
path: "kzpz",
},
{
name: '辅导分红',
path: "fdfh",
},
{
name: '服务补贴',
path: "fwbt",
},
{
name: '奖金扣项',
path: "jjkx",
},
{
name: '云代配置',
path: "ydpz",
},
{
name: '环球积分',
path: "hqjf",
},
{
name: '车奖积分',
path: "njjf",
},
],
tableData: [ tableData: [
{ {
name: "asads", name: 'asads',
put: 2, put: 2
}, }
], ],
ifupdate: true, ifupdate: true,
deductTypeList: [], deductTypeList: []
}; }
}, },
created() { created() {
this.getDeductList(); this.getDeductList()
this.getDeductTypeList(); this.getDeductTypeList()
}, },
methods: { methods: {
// //
@ -139,43 +102,43 @@ export default {
// //
getDeductList() { getDeductList() {
getDeductList().then((res) => { getDeductList().then((res) => {
this.tableData = res.data; this.tableData = res.data
}); })
}, },
// //
getDeductTypeList() { getDeductTypeList() {
getDeductTypeList().then((res) => { getDeductTypeList().then((res) => {
this.deductTypeList = res.data; this.deductTypeList = res.data
}); })
}, },
// //
savedate() { savedate() {
this.ifupdate = true; this.ifupdate = true
updateDeduct({ bonusDeductList: this.tableData }).then((res) => { updateDeduct({ bonusDeductList: this.tableData }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "warning", type: 'warning'
}); })
} }
this.getDeductList(); this.getDeductList()
}); })
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "warning-row"; return 'warning-row'
} else if (rowIndex % 2 == 0) { } else if (rowIndex % 2 == 0) {
return "success-row"; return 'success-row'
}
return ''
}
}
} }
return "";
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -2,9 +2,9 @@
<div class="page"> <div class="page">
<topBar <topBar
v-if="topList.length > 0" v-if="topList.length > 0"
:topList="topList" :top-list="topList"
:moren="moren" :moren="moren"
></topBar> />
<div class="main"> <div class="main">
<div class="maintable"> <div class="maintable">
<el-table <el-table
@ -19,8 +19,7 @@
align="center" align="center"
prop="gradeName" prop="gradeName"
:label="'等级'" :label="'等级'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="expandRatio" prop="expandRatio"
@ -28,10 +27,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.expandRatio"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.expandRatio" />
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -41,10 +40,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.expandCapping"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.expandCapping" />
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -54,10 +53,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.repurchaseRatio"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.repurchaseRatio" />
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -67,10 +66,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.repurchaseCapping"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.repurchaseCapping" />
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -80,16 +79,16 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-select <el-select
v-model="scope.row.firstCalculate"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.firstCalculate"
> >
<el-option <el-option
v-for="item in yesNoList" v-for="item in yesNoList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
@ -100,16 +99,16 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-select <el-select
v-model="scope.row.firstAssess"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.firstAssess"
> >
<el-option <el-option
v-for="item in ssessmentTypeList" v-for="item in ssessmentTypeList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
@ -120,16 +119,16 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-select <el-select
v-model="scope.row.repurchaseCalculate"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.repurchaseCalculate"
> >
<el-option <el-option
v-for="item in yesNoList" v-for="item in yesNoList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
@ -140,16 +139,16 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-select <el-select
v-model="scope.row.repurchaseAssess"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.repurchaseAssess"
> >
<el-option <el-option
v-for="item in ssessmentTypeList" v-for="item in ssessmentTypeList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
@ -167,8 +166,7 @@
align="center" align="center"
prop="expandName" prop="expandName"
:label="'4-N配置'" :label="'4-N配置'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="expandNumber" prop="expandNumber"
@ -176,10 +174,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.expandNumber"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.expandNumber" />
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -189,14 +187,14 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.expandRatio"
clearable clearable
:disabled="ifupdate" :disabled="ifupdate"
v-model="scope.row.expandRatio" />
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="" label=""> </el-table-column> <el-table-column align="center" prop="" label="" />
<el-table-column align="center" prop="" label=""> </el-table-column> <el-table-column align="center" prop="" label="" />
</el-table> </el-table>
<el-table <el-table
@ -213,8 +211,8 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-select <el-select
clearable
v-model="scope.row.value" v-model="scope.row.value"
clearable
:placeholder="'请选择'" :placeholder="'请选择'"
:disabled="ifupdate" :disabled="ifupdate"
> >
@ -223,23 +221,24 @@
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="" label=""> </el-table-column> <el-table-column align="center" prop="" label="" />
<el-table-column align="center" prop="" label=""> </el-table-column> <el-table-column align="center" prop="" label="" />
<el-table-column align="center" prop="" label=""> </el-table-column> <el-table-column align="center" prop="" label="" />
<el-table-column align="center" prop="" label=""> </el-table-column> <el-table-column align="center" prop="" label="" />
</el-table> </el-table>
</div> </div>
</div> </div>
<div class="footer"> <div class="footer">
<div style="margin: 0 auto"> <div style="margin: 0 auto">
<el-button class="thebtn btn1" @click="ifupdate = false" <el-button
> {{ '修改' }}</el-button class="thebtn btn1"
> @click="ifupdate = false"
> {{ '修改' }}</el-button>
<el-button class="thebtn btn2" @click="savedate">{{ '保存' }}</el-button> <el-button class="thebtn btn2" @click="savedate">{{ '保存' }}</el-button>
</div> </div>
</div> </div>
@ -247,124 +246,86 @@
</template> </template>
<script> <script>
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import {getDealerYesNo} from "@/api/delivery" import { getDealerYesNo } from '@/api/delivery'
import { getExpandList, updateExpand, getbdBonusExpand,getAssessmentType } from "@/api/bonus"; import { getExpandList, updateExpand, getbdBonusExpand, getAssessmentType } from '@/api/bonus'
import { getzccsList } from '@/api/siteConfig' import { getzccsList } from '@/api/siteConfig'
import { saveYfpz } from '@/api/system' import { saveYfpz } from '@/api/system'
import {isLocals} from "@/utils/numberToCurrency"; import { isLocals } from '@/utils/numberToCurrency'
import { mixin } from './mixins'
export default { export default {
name: "Kzpz", name: 'Kzpz',
components: { components: {
topBar, topBar
}, },
mixins: [mixin],
data() { data() {
return { return {
moren: "kzpz", moren: 'kzpz',
topList: [
{
name: '奖项配置',
path: "bonus",
},
{
name: '直推配置',
path: "ztpz",
},
{
name: '拓展配置',
path: "kzpz",
},
{
name: '辅导分红',
path: "fdfh",
},
{
name: '服务补贴',
path: "fwbt",
},
{
name: '奖金扣项',
path: "jjkx",
},
{
name: '云代配置',
path: "ydpz",
},
{
name: '环球积分',
path: "hqjf",
},
{
name: '车奖积分',
path: "njjf",
},
],
tableData: [], tableData: [],
tableData2: [], tableData2: [],
tableData3: [], tableData3: [],
ifupdate: true, ifupdate: true,
fdWayList: [ fdWayList: [
{ value: '1', label: "日" }, { value: '1', label: '日' },
{ value: '2', label: "周" }, { value: '2', label: '周' }
], ],
ssessmentTypeList: [], ssessmentTypeList: [],
yesNoList: [] yesNoList: []
}; }
}, },
created() { created() {
this.getExpandList(); this.getExpandList()
}, },
methods: { methods: {
isLocals, isLocals,
// //
getExpandList() { getExpandList() {
getExpandList().then((res) => { getExpandList().then((res) => {
this.tableData = res.rows; this.tableData = res.rows
}); })
getbdBonusExpand().then((res) => { getbdBonusExpand().then((res) => {
this.tableData2 = res.rows; this.tableData2 = res.rows
}); })
getzccsList({ key: 'EXPAND_CAP_METHOD1' }).then(res => { getzccsList({ key: 'EXPAND_CAP_METHOD1' }).then(res => {
this.tableData3 = res.data this.tableData3 = res.data
}) })
// //
getAssessmentType().then((res) => { getAssessmentType().then((res) => {
this.ssessmentTypeList = res.data; this.ssessmentTypeList = res.data
}); })
getDealerYesNo().then(res => { getDealerYesNo().then(res => {
this.yesNoList = res.data this.yesNoList = res.data
}) })
}, },
// //
savedate() { savedate() {
this.ifupdate = true; this.ifupdate = true
updateExpand({ updateExpand({
expandList: this.tableData, expandList: this.tableData,
bonusExpands: this.tableData2, bonusExpands: this.tableData2
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
this.getExpandList(); this.getExpandList()
} }
}); })
saveYfpz(this.tableData3).then(res => { saveYfpz(this.tableData3).then(res => {
}) })
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "warning-row"; return 'warning-row'
} else if (rowIndex % 2 == 0) { } else if (rowIndex % 2 == 0) {
return "success-row"; return 'success-row'
}
return ''
}
}
} }
return "";
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -0,0 +1,45 @@
export const mixin = {
data() {
return {
topList: [
{
name: '奖项配置',
path: 'bonus'
},
{
name: '直推配置',
path: 'ztpz'
},
{
name: '拓展配置',
path: 'kzpz'
},
{
name: '培育津贴',
path: 'fdfh'
},
{
name: '服务补贴',
path: 'fwbt'
},
{
name: '奖金扣项',
path: 'jjkx'
},
{
name: '云代配置',
path: 'ydpz'
},
{
name: '环球积分',
path: 'hqjf'
},
{
name: '车奖积分',
path: 'njjf'
}
]
}
}
}

View File

@ -2,9 +2,9 @@
<div class="page"> <div class="page">
<topBar <topBar
v-if="topList.length > 0" v-if="topList.length > 0"
:topList="topList" :top-list="topList"
:moren="moren" :moren="moren"
></topBar> />
<div class="main"> <div class="main">
<div class="maintable"> <div class="maintable">
<el-table <el-table
@ -18,18 +18,18 @@
align="center" align="center"
prop="awardsName" prop="awardsName"
:label="'真实奖衔'" :label="'真实奖衔'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="carAwardPoints" prop="carAwardPoints"
:label="'车奖比例'+'(%)'" :label="'车奖比例'+'(%)'"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input clearable <el-input
:disabled="ifupdate"
v-model="scope.row.carAwardPoints" v-model="scope.row.carAwardPoints"
></el-input> clearable
:disabled="ifupdate"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -37,9 +37,10 @@
</div> </div>
<div class="footer"> <div class="footer">
<div style="margin: 0 auto"> <div style="margin: 0 auto">
<el-button class="thebtn btn1" @click="ifupdate = false" <el-button
>{{'修改'}}</el-button class="thebtn btn1"
> @click="ifupdate = false"
>{{ '修改' }}</el-button>
<el-button class="thebtn btn2" @click="savedate">{{ '保存' }}</el-button> <el-button class="thebtn btn2" @click="savedate">{{ '保存' }}</el-button>
</div> </div>
</div> </div>
@ -47,104 +48,67 @@
</template> </template>
<script> <script>
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import { getintegralList, updategCarAwardPoints } from "@/api/bonus"; import { getintegralList, updategCarAwardPoints } from '@/api/bonus'
import { mixin } from './mixins'
export default { export default {
name: "Njjf", name: 'Njjf',
components: { components: {
topBar, topBar
}, },
mixins: [mixin],
data() { data() {
return { return {
moren: "njjf", moren: 'njjf',
topList: [
{
name: '奖项配置',
path: "bonus",
},
{
name: '直推配置',
path: "ztpz",
},
{
name: '拓展配置',
path: "kzpz",
},
{
name: '辅导分红',
path: "fdfh",
},
{
name: '服务补贴',
path: "fwbt",
},
{
name: '奖金扣项',
path: "jjkx",
},
{
name: '云代配置',
path: "ydpz",
},
{
name: '环球积分',
path: "hqjf",
},
{
name: '车奖积分',
path: "njjf",
},
],
tableData: [ tableData: [
{ {
name: "asads", name: 'asads',
put: 2, put: 2
}, }
], ],
ifupdate: true, ifupdate: true
}; }
}, },
created() { created() {
this.getintegralList(); this.getintegralList()
}, },
methods: { methods: {
getintegralList() { getintegralList() {
getintegralList().then((res) => { getintegralList().then((res) => {
this.tableData = res.rows; this.tableData = res.rows
}); })
}, },
// //
savedate() { savedate() {
this.ifupdate = true; this.ifupdate = true
updategCarAwardPoints({ carAwardPointsList: this.tableData }).then( updategCarAwardPoints({ carAwardPointsList: this.tableData }).then(
(res) => { (res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "warning", type: 'warning'
}); })
} }
this.getintegralList() this.getintegralList()
} }
); )
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "warning-row"; return 'warning-row'
} else if (rowIndex % 2 == 0) { } else if (rowIndex % 2 == 0) {
return "success-row"; return 'success-row'
}
return ''
}
}
} }
return "";
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -2,9 +2,9 @@
<div class="page"> <div class="page">
<topBar <topBar
v-if="topList.length > 0" v-if="topList.length > 0"
:topList="topList" :top-list="topList"
:moren="moren" :moren="moren"
></topBar> />
<div class="main"> <div class="main">
<div class="maintable"> <div class="maintable">
<el-table <el-table
@ -13,11 +13,10 @@
:header-cell-style="{ background: '#EEEEEE' }" :header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
> >
<el-table-column width="200px" align="center" prop="cloudTypeVal" :label="'云代收益'"> <el-table-column width="200px" align="center" prop="cloudTypeVal" :label="'云代收益'" />
</el-table-column>
<el-table-column align="center" prop="cloudRatio" :label="'比例'+'(%)'"> <el-table-column align="center" prop="cloudRatio" :label="'比例'+'(%)'">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input clearable :disabled="ifupdate" v-model="scope.row.cloudRatio"></el-input> <el-input v-model="scope.row.cloudRatio" clearable :disabled="ifupdate" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -33,58 +32,21 @@
</template> </template>
<script> <script>
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import { getCloudList, updateCloud } from '@/api/bonus' import { getCloudList, updateCloud } from '@/api/bonus'
import { mixin } from './mixins'
export default { export default {
name: "Ydpz", name: 'Ydpz',
components: { components: {
topBar, topBar
}, },
mixins: [mixin],
data() { data() {
return { return {
moren: "ydpz", moren: 'ydpz',
topList: [
{
name: '奖项配置',
path: "bonus",
},
{
name: '直推配置',
path: "ztpz",
},
{
name: '拓展配置',
path: "kzpz",
},
{
name: '辅导分红',
path: "fdfh",
},
{
name: '服务补贴',
path: "fwbt",
},
{
name: '奖金扣项',
path: "jjkx",
},
{
name: '云代配置',
path: "ydpz",
},
{
name: '环球积分',
path: "hqjf",
},
{
name: '车奖积分',
path: "njjf",
},
],
tableData: [], tableData: [],
ifupdate:true, ifupdate: true
}; }
}, },
created() { created() {
this.getCloudList() this.getCloudList()
@ -102,27 +64,27 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "warning", type: 'warning'
}); })
} }
this.getCloudList() this.getCloudList()
}) })
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "warning-row"; return 'warning-row'
} else if (rowIndex % 2 == 0) { } else if (rowIndex % 2 == 0) {
return "success-row"; return 'success-row'
}
return ''
}
}
} }
return "";
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -436,53 +436,16 @@ import {
getTakeValueTypeList, getTakeValueTypeList,
getAlgebra getAlgebra
} from '@/api/bonus' } from '@/api/bonus'
import { mixin } from './mixins'
export default { export default {
name: 'Ztpz', name: 'Ztpz',
components: { components: {
topBar topBar
}, },
mixins: [mixin],
data() { data() {
return { return {
moren: 'ztpz', moren: 'ztpz',
topList: [
{
name: '奖项配置',
path: 'bonus'
},
{
name: '直推配置',
path: 'ztpz'
},
{
name: '拓展配置',
path: 'kzpz'
},
{
name: '辅导分红',
path: 'fdfh'
},
{
name: '服务补贴',
path: 'fwbt'
},
{
name: '奖金扣项',
path: 'jjkx'
},
{
name: '云代配置',
path: 'ydpz'
},
{
name: '环球积分',
path: 'hqjf'
},
{
name: '车奖积分',
path: 'njjf'
}
],
form: { form: {
bonusDirectLoopExtsList: [ bonusDirectLoopExtsList: [
{ {

View File

@ -2,19 +2,18 @@
<div class="page"> <div class="page">
<topBar <topBar
v-if="topList.length > 0" v-if="topList.length > 0"
:topList="topList" :top-list="topList"
:moren="moren" :moren="moren"
></topBar> />
<div class="main"> <div class="main">
<div class="maintop"> <div class="maintop">
<div class="mainbtn"> <div class="mainbtn">
<el-button <el-button
v-hasButtons="['AwardAllocationRetailAdd']"
size="small" size="small"
class="thebtn1" class="thebtn1"
v-hasButtons="['AwardAllocationRetailAdd']"
@click="adddate()" @click="adddate()"
>{{ '添加' }}</el-button >{{ '添加' }}</el-button>
>
<!-- <el-button size="small" class="thebtn2"> <!-- <el-button size="small" class="thebtn2">
{{ '导出' }}</el-button {{ '导出' }}</el-button
> --> > -->
@ -22,170 +21,69 @@
</div> </div>
<div class="maintable"> <div class="maintable">
<el-table <el-table
v-loading="loading"
height="750px" height="750px"
:data="tableData" :data="tableData"
v-loading="loading"
style="width: 100%" style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }" :header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55"> </el-table-column> <el-table-column type="selection" width="55" />
<el-table-column
align="center"
prop=""
:label="'图片'"
width="180"
>
<template slot-scope="scope">
<img
style="width: 44px; height: 44px"
:src="scope.row.image"
alt=""
/>
</template>
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="awardsName" prop="awardsName"
:label="'真实奖衔'" label="奖衔名称"
width="180" width="100"
> />
</el-table-column> <el-table-column width="150" align="center" prop="totalCheck" label="累计业绩" />
<!-- <el-table-column <el-table-column width="110" align="center" prop="rangeRatio" label="福利级差比例" />
align="center" <el-table-column width="110" align="center" prop="monthRepurchaseRatio" label="复购级差比例" />
prop="awardsValue"
label="奖衔值"
width="180"
>
</el-table-column> -->
<el-table-column <el-table-column
align="center" align="center"
prop="communityCheck" prop="benefitAvgRatio"
:label="'小区考核开始' + `(${isLocals()})`" label="福利平均比例"
width="180" width="110"
> />
<template slot-scope="scope">
{{ scope.row.communityCheck | numberToCurrency }}
</template>
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="communityCheckEnd" prop="benefitShareRatio"
:label="'小区考核结束' + `(${isLocals()})`" label="福利加权比例"
width="180" width="110"
> />
<template slot-scope="scope">
{{ scope.row.communityCheckEnd | numberToCurrency }}
</template>
</el-table-column>
<el-table-column
align="center"
prop="purchaseCheck"
width="140"
:label="'复购考核' + `(${isLocals()})`"
>
<template slot-scope="scope">
{{ scope.row.purchaseCheck | numberToCurrency }}
</template>
</el-table-column>
<el-table-column
align="center"
prop="shareCheck"
width="140"
:label="'分红考核' + '(BV)'"
>
</el-table-column>
<el-table-column align="center" prop="algebra" label="代数">
</el-table-column>
<el-table-column
align="center"
prop="globalDividend"
label="全球分红"
>
</el-table-column>
<el-table-column align="center" prop="placeDeptNum" label="部门数量">
</el-table-column>
<el-table-column align="center" prop="totalCheck" label="累计业绩">
</el-table-column>
<el-table-column
align="center"
prop="shareCommunityCheck"
label="分红小区考核PV"
width="150"
>
</el-table-column>
<el-table-column
align="center"
prop="shareCommunityCheckEnd"
width="200"
label="分红小区考核结束PV"
>
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="shareTotalCheck" prop="shareTotalCheck"
label="分红累计业绩" label="分红累计业绩"
width="150" width="150"
> />
</el-table-column> <el-table-column width="80" align="center" prop="placeDeptNum" label="部门数量" />
<el-table-column align="center" prop="rangeRatio" label="极差比例"> <el-table-column width="150" align="center" prop="shareCommunityCheck" label="分红小部门业绩" />
</el-table-column>
<el-table-column
align="center"
prop="benefitAvgRatio"
label="福利平均比例"
width="140"
>
</el-table-column>
<el-table-column
align="center"
prop="benefitShareRatio"
label="福利加权比例"
width="140"
>
</el-table-column>
<el-table-column
align="center"
prop="pkCheckAwardsLeftVal"
:label="'左区奖衔'"
>
</el-table-column>
<el-table-column
align="center"
prop="pkCheckAwardsRightVal"
:label="'右区奖衔'"
></el-table-column>
<el-table-column
align="center"
prop="relationType"
:label="'考核'"
:formatter="checkRelation"
></el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="time" prop="time"
:label="'操作'" :label="'操作'"
fixed="right" fixed="right"
width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@click.native.prevent="update(scope.row, tableData)" v-has-buttons="['AwardAllocationRetailEdit']"
type="text" type="text"
size="small" size="small"
class="button-s" class="button-s"
style="color: #4391fd" style="color: #4391fd"
v-has-buttons="['AwardAllocationRetailEdit']" @click.native.prevent="update(scope.row, tableData)"
> >
{{ '修改' }} {{ '修改' }}
</el-button> </el-button>
<el-button <el-button
@click.native.prevent="updateState(scope.row, tableData)"
type="text" type="text"
size="small" size="small"
class="button-s" class="button-s"
style="color: #c73030" style="color: #c73030"
@click.native.prevent="updateState(scope.row, tableData)"
> >
<!-- 0启用1禁用 --> <!-- 0启用1禁用 -->
{{ {{
@ -223,268 +121,112 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="handleClose" :before-close="handleClose"
> >
<el-form ref="form" :rules="rules" :model="form" label-width="auto"> <el-form ref="form" :rules="rules" :model="form" label-width="140px">
<el-row style="display: flex; justify-content: space-between"> <el-row :gutter="20">
<el-col :span="11" style="margin-left: -20px"> <el-col :span="11">
<el-form-item label="奖衔名称" prop="awardsName"> <el-form-item label="奖衔名称" prop="awardsName">
<el-input <el-input
clearable
v-model="form.awardsName" v-model="form.awardsName"
clearable
placeholder="" placeholder=""
></el-input> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item
:label="'小区考核开始' + `(${isLocals()})`"
prop="communityCheck"
>
<el-input
clearable
v-model="form.communityCheck"
placeholder=""
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="display: flex; justify-content: space-between">
<el-col :span="11" style="margin-left: -20px">
<el-form-item
:label="'复购考核' + `(${isLocals()})`"
prop="purchaseCheck"
>
<el-input
clearable
v-model="form.purchaseCheck"
placeholder=""
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item
:label="'小区考核结束' + `(${isLocals()})`"
prop="communityCheckEnd"
>
<el-input
clearable
v-model="form.communityCheckEnd"
placeholder=""
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="display: flex; justify-content: space-between">
<el-col :span="11" style="margin-left: -20px">
<el-form-item label="代数" prop="algebra">
<el-input
clearable
v-model="form.algebra"
placeholder=""
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="分红考核" prop="shareCheck">
<el-input
clearable
v-model="form.shareCheck"
placeholder=""
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="display: flex; justify-content: space-between">
<el-col :span="11" style="margin-left: -20px">
<el-form-item label="全球分红" prop="globalDividend">
<el-input
clearable
v-model="form.globalDividend"
placeholder=""
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="部门数量" prop="placeDeptNum">
<el-input
clearable
v-model="form.placeDeptNum"
placeholder=""
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="display: flex; justify-content: space-between">
<el-col :span="11" style="margin-left: -20px">
<el-form-item label="累计业绩" prop="totalCheck"> <el-form-item label="累计业绩" prop="totalCheck">
<el-input <el-input
clearable
v-model="form.totalCheck" v-model="form.totalCheck"
clearable
placeholder="" placeholder=""
></el-input> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="差比例" prop="rangeRatio"> <el-form-item label="福利级差比例" prop="rangeRatio">
<el-input <el-input
clearable
v-model="form.rangeRatio" v-model="form.rangeRatio"
clearable
placeholder="" placeholder=""
></el-input> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="11">
<el-row style="display: flex; justify-content: space-between"> <el-form-item label="复购级差比例" prop="monthRepurchaseRatio">
<el-col :span="11" style="margin-left: -20px"> <el-input
v-model="form.monthRepurchaseRatio"
clearable
placeholder=""
/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="福利平均比例" prop="benefitAvgRatio"> <el-form-item label="福利平均比例" prop="benefitAvgRatio">
<el-input <el-input
clearable
v-model="form.benefitAvgRatio" v-model="form.benefitAvgRatio"
clearable
placeholder="" placeholder=""
></el-input> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="福利加权比例" prop="benefitShareRatio"> <el-form-item label="福利加权比例" prop="benefitShareRatio">
<el-input <el-input
clearable
v-model="form.benefitShareRatio" v-model="form.benefitShareRatio"
placeholder=""
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="display: flex; justify-content: space-between">
<!-- <el-col :span="11" style="margin-left: -20px">
<el-form-item label="全球分红(%)" prop="globalDividend">
<el-input
clearable clearable
v-model="form.globalDividend"
placeholder="" placeholder=""
></el-input> />
</el-form-item>
</el-col> -->
<el-col :span="11" style="margin-left: -20px">
<el-form-item :label="'左区奖衔'" prop="pkCheckAwardsLeft">
<el-select
clearable
v-model="form.pkCheckAwardsLeft"
placeholder=""
>
<el-option
v-for="item in awardsListChiose"
:key="item.pkId"
:label="item.awardsName"
:value="item.pkId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item :label="'右区奖衔'" prop="pkCheckAwardsRight">
<el-select
clearable
v-model="form.pkCheckAwardsRight"
placeholder=""
>
<el-option
v-for="item in awardsListChiose"
:key="item.pkId"
:label="item.awardsName"
:value="item.pkId"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item :label="'考核'" prop="relationType">
<el-select clearable v-model="form.relationType" placeholder="">
<el-option
v-for="item in relationList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" style="margin-left: 30px">
<el-form-item required label="奖衔属性" prop="awardsValue">
<el-select clearable v-model="form.awardsValue" placeholder="">
<el-option
v-for="item in awardsSxList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row style="display: flex; justify-content: space-between">
<el-col :span="11" style="margin-left: -20px">
<el-form-item label="分红小区考核PV" prop="shareCommunityCheck">
<el-input
clearable
v-model="form.shareCommunityCheck"
placeholder=""
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="分红累计业绩" prop="shareTotalCheck"> <el-form-item label="分红累计业绩" prop="shareTotalCheck">
<el-input <el-input
clearable
v-model="form.shareTotalCheck" v-model="form.shareTotalCheck"
placeholder=""
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="display: flex; justify-content: space-between">
<el-col :span="11" style="margin-left: -20px">
<el-form-item
label="分红小区考核结束PV"
prop="shareCommunityCheckEnd"
>
<el-input
clearable clearable
v-model="form.shareCommunityCheckEnd"
placeholder="" placeholder=""
></el-input> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> </el-col> <el-col :span="11">
</el-row> <el-form-item label="部门数量" prop="placeDeptNum">
<el-row> <el-input
<el-col :span="12"> v-model="form.placeDeptNum"
<el-form-item :label="'上传图片'" prop="image"> clearable
<imageUpload v-model="form.image" /> placeholder=""
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11">
<el-form-item label="分红小部门业绩" prop="shareCommunityCheck">
<el-input
v-model="form.shareCommunityCheck"
clearable
placeholder=""
/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item required label="奖衔属性" prop="awardsValue">
<el-select v-model="form.awardsValue" clearable placeholder="">
<el-option
v-for="item in awardsSxList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="颜色" prop="color"> <el-form-item label="颜色" prop="color">
<el-color-picker v-model="form.color"></el-color-picker> <el-color-picker v-model="form.color" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11" style="margin-left: -20px">
<el-form-item label="文字内容" prop="textContent">
<el-input
clearable
v-model="form.textContent"
placeholder=""
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="cancels" @click="handleClose"> <el-button class="cancels" @click="handleClose">
{{ '取消' }}</el-button {{ '取消' }}</el-button>
>
<el-button class="submit" type="primary" @click="onSubmit('form')">{{ <el-button class="submit" type="primary" @click="onSubmit('form')">{{
'确定' '确定'
}}</el-button> }}</el-button>
@ -494,8 +236,8 @@
</template> </template>
<script> <script>
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from '@/components/ImageUpload'
import { import {
getAwardsList, getAwardsList,
getAwardsListChiose, getAwardsListChiose,
@ -505,35 +247,35 @@ import {
scGenerate, scGenerate,
updateAwards, updateAwards,
updateStatusAwards, updateStatusAwards,
getAwardsValueList, getAwardsValueList
} from "@/api/retailLevel"; } from '@/api/retailLevel'
import { isLocals } from "@/utils/numberToCurrency"; import { isLocals } from '@/utils/numberToCurrency'
export default { export default {
name: "retailJxpz", name: 'RetailJxpz',
components: { components: {
topBar, topBar,
ImageUpload, ImageUpload
}, },
data() { data() {
return { return {
moren: "retailJxpz", moren: 'retailJxpz',
topList: [ topList: [
{ {
name: '等级配置', name: '等级配置',
path: "retailLevel", path: 'retailLevel'
}, },
{ {
name: '奖衔配置', name: '奖衔配置',
path: "retailJxpz", path: 'retailJxpz'
}, },
{ {
name: '复购极差', name: '复购极差',
path: "retailFgjc", path: 'retailFgjc'
}, }
], ],
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50
}, },
total: 0, total: 0,
multipleSelection: [], multipleSelection: [],
@ -543,42 +285,35 @@ export default {
awardsListChiose: [], // awardsListChiose: [], //
relationList: [], // relationList: [], //
form: { form: {
awardsName: "", // awardsName: '', //
communityCheck: "", // communityCheck: '0', //
purchaseCheck: "", // purchaseCheck: '0', //
communityCheckEnd: "", // communityCheckEnd: '0', //
globalDividend: "", // globalDividend: '0', //
pkCheckAwardsLeft: "", // pkCheckAwardsLeft: '', //
pkCheckAwardsRight: "", // pkCheckAwardsRight: '', //
relationType: "", // relationType: '', //
awardsValue: "", // awardsValue: '', //
color: "", monthRepurchaseRatio: '', //
image: "", color: '',
textContent: "", image: '',
algebra: "", textContent: '',
shareCheck: "", algebra: '0',
placeDeptNum: "", shareCheck: '',
totalCheck: "", placeDeptNum: '',
rangeRatio: "", totalCheck: '',
benefitAvgRatio: "", rangeRatio: '',
benefitShareRatio: "", benefitAvgRatio: '',
shareCommunityCheck: "", benefitShareRatio: '',
shareCommunityCheckEnd: "", shareCommunityCheck: '0',
shareTotalCheck: "", shareCommunityCheckEnd: '0',
shareTotalCheck: ''
}, },
rules: { rules: {
awardsName: [ awardsName: [
{ required: true, message: "请输入奖衔名称", trigger: "blur" }, { required: true, message: '请输入奖衔名称', trigger: 'blur' }
],
communityCheck: [
{ required: true, message: "请输入", trigger: "blur" },
],
purchaseCheck: [
{ required: true, message: "请输入PV", trigger: "blur" },
],
communityCheckEnd: [
{ required: true, message: "请输入", trigger: "blur" },
], ],
// globalDividend: [ // globalDividend: [
// { required: true, message: "", trigger: "blur" }, // { required: true, message: "", trigger: "blur" },
// ], // ],
@ -591,29 +326,29 @@ export default {
// relationType: [ // relationType: [
// { required: true, message: "", trigger: "change" }, // { required: true, message: "", trigger: "change" },
// ], // ],
color: [{ required: true, message: "请选择颜色", trigger: "change" }], color: [{ required: true, message: '请选择颜色', trigger: 'change' }]
// image: [ // image: [
// { required: true, message: "", trigger: "change" }, // { required: true, message: "", trigger: "change" },
// ], // ],
}, },
dialogTitle: "", dialogTitle: '',
addEdit: "", addEdit: '',
awardsSxList: [], // awardsSxList: [] //
}; }
}, },
created() { created() {
this.getAwardsList(); this.getAwardsList()
this.getAwardsListChiose(); this.getAwardsListChiose()
this.getRelationList(); this.getRelationList()
this.getAwardsValueList(); this.getAwardsValueList()
}, },
methods: { methods: {
isLocals, isLocals,
// //
getAwardsValueList() { getAwardsValueList() {
getAwardsValueList().then((res) => { getAwardsValueList().then((res) => {
this.awardsSxList = res.data; this.awardsSxList = res.data
}); })
}, },
// / // /
@ -621,63 +356,63 @@ export default {
this.$confirm('确认更改状态?', '提示', { this.$confirm('确认更改状态?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: "warning", type: 'warning'
}).then(() => { }).then(() => {
var thestate = ""; var thestate = ''
if (row.enableState == 0) { if (row.enableState == 0) {
thestate = 1; thestate = 1
} else if (row.enableState == 1) { } else if (row.enableState == 1) {
thestate = 0; thestate = 0
} }
updateStatusAwards({ pkId: row.pkId, enableState: thestate }).then( updateStatusAwards({ pkId: row.pkId, enableState: thestate }).then(
(res) => { (res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
// //
this.getAwardsList(); this.getAwardsList()
} }
} }
); )
}); })
}, },
onSubmit(formName) { onSubmit(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
let url = ""; let url = ''
if (this.addEdit == 1) { if (this.addEdit == 1) {
// //
url = scGenerate; url = scGenerate
} else { } else {
// //
url = updateAwards; url = updateAwards
} }
// //
url(this.form).then((res) => { url(this.form).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.updateShow = false; this.updateShow = false
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
this.getAwardsList(); this.getAwardsList()
this.addEdit = ""; this.addEdit = ''
} }
}); })
} else { } else {
return false; return false
} }
}); })
}, },
// //
adddate() { adddate() {
this.dialogTitle = '添加'; this.dialogTitle = '添加'
this.updateShow = true; this.updateShow = true
this.addEdit = 1; this.addEdit = 1
this.$refs["form"].clearValidate(); this.$refs['form'].clearValidate()
this.$refs["form"].resetFields(); this.$refs['form'].resetFields()
// scGenerate({}).then(res=>{ // scGenerate({}).then(res=>{
// if(res.code==200){ // if(res.code==200){
// this.getAwardsList() // this.getAwardsList()
@ -686,78 +421,78 @@ export default {
}, },
// //
update(row, item) { update(row, item) {
this.addEdit = 2; this.addEdit = 2
this.updateShow = true; this.updateShow = true
this.dialogTitle = '修改'; this.dialogTitle = '修改'
getOneAwards(row.pkId).then((res) => { getOneAwards(row.pkId).then((res) => {
this.form = res.data; this.form = res.data
}); })
}, },
getAwardsListChiose() { getAwardsListChiose() {
// //
getAwardsListChiose().then((res) => { getAwardsListChiose().then((res) => {
this.awardsListChiose = res.rows; this.awardsListChiose = res.rows
}); })
}, },
// //
getAwardsList() { getAwardsList() {
this.loading = true; this.loading = true
getAwardsList(this.queryParams).then((res) => { getAwardsList(this.queryParams).then((res) => {
this.tableData = res.rows; this.tableData = res.rows
this.total = res.total; this.total = res.total
this.loading = false; this.loading = false
}); })
}, },
// //
handleClose() { handleClose() {
this.updateShow = false; this.updateShow = false
this.$refs["form"].clearValidate(); this.$refs['form'].clearValidate()
this.$refs["form"].resetFields(); this.$refs['form'].resetFields()
}, },
// //
getRelationList() { getRelationList() {
getRelationList().then((res) => { getRelationList().then((res) => {
this.relationList = res.data; this.relationList = res.data
}); })
}, },
// //
checkRelation(row) { checkRelation(row) {
let kaohe = ""; let kaohe = ''
if (this.relationList) { if (this.relationList) {
this.relationList.map((item) => { this.relationList.map((item) => {
if (row.relationType == item.value) { if (row.relationType == item.value) {
kaohe = item.label; kaohe = item.label
} }
}); })
} }
return kaohe; return kaohe
}, },
// //
checkAwards(row) { checkAwards(row) {
let state = ""; let state = ''
if (this.awardsListChiose) { if (this.awardsListChiose) {
this.awardsListChiose.map((element) => { this.awardsListChiose.map((element) => {
if (row.pkCheckAwardsLeft == element.awardsValue) { if (row.pkCheckAwardsLeft == element.awardsValue) {
state = element.awardsName; state = element.awardsName
} }
}); })
} }
return state; return state
}, },
checkAwards2(row) { checkAwards2(row) {
let state2 = ""; let state2 = ''
if (this.awardsListChiose) { if (this.awardsListChiose) {
this.awardsListChiose.map((element) => { this.awardsListChiose.map((element) => {
if (row.pkCheckAwardsRight == element.awardsValue) { if (row.pkCheckAwardsRight == element.awardsValue) {
state2 = element.awardsName; state2 = element.awardsName
} }
}); })
} }
return state2; return state2
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val
}, },
// //
deleteRow(row, item) { deleteRow(row, item) {
@ -766,23 +501,23 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: "success", type: 'success'
}); })
this.getAwardsList(); this.getAwardsList()
} }
}); })
}); })
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "warning-row"; return 'warning-row'
} else if (rowIndex % 2 == 0) { } else if (rowIndex % 2 == 0) {
return "success-row"; return 'success-row'
}
return ''
}
}
} }
return "";
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -44,9 +44,9 @@ module.exports = {
}, },
proxy: { proxy: {
'/prod-api': { '/prod-api': {
target: 'http://192.168.0.104:8080', target: 'http://t-app.beida777.com',
changeOrigin: true, changeOrigin: true
pathRewrite: { '^/prod-api': '' } // pathRewrite: { '^/prod-api': '' }
} }
} }
}, },