forked from angelo/web-retail-admin
feat(memberRegion): 添加配送中心, 会员收益区域改为会员区域信息
This commit is contained in:
parent
ef285ea86c
commit
7b96c13223
|
@ -2065,17 +2065,23 @@ export const constantRoutes = [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'memberRetailRegion',
|
path: 'memberRetailRegionConfig',
|
||||||
name: 'memberRetailRegion',
|
name: 'memberRetailRegionConfig',
|
||||||
meta: { title: i18n.t('会员区域配置') },
|
meta: { title: i18n.t('会员区域管理') },
|
||||||
component: ParentView,
|
component: ParentView,
|
||||||
redirect: 'memberRetailRegion/index',
|
redirect: 'memberRetailRegionConfig/memberRetailRegion',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'memberRetailRegion',
|
path: 'memberRetailRegion',
|
||||||
name: 'memberRetailRegion',
|
name: 'memberRetailRegion',
|
||||||
component: () => import('@/views/configManage/memberRetailRegion/index'),
|
component: () => import('@/views/configManage/memberRetailRegion/index'),
|
||||||
meta: { title: i18n.t('会员区域配置') }
|
meta: { title: i18n.t('会员区域信息') }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'distributionCenter',
|
||||||
|
name: 'DistributionCenter',
|
||||||
|
component: () => import('@/views/configManage/memberRetailRegion/DistributionCenter'),
|
||||||
|
meta: { title: i18n.t('配送中心配置') }
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,761 @@
|
||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<topBar v-if="topList.length > 0" :top-list="topList" :moren="moren" />
|
||||||
|
<div class="thetopbox">
|
||||||
|
<el-form ref="form" :model="queryParams" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item :label="'会员编号'" prop="memberCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.memberCode"
|
||||||
|
clearable
|
||||||
|
:placeholder="'请输入'"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item :label="$t('是否生效')" prop="status">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.effective"
|
||||||
|
clearable
|
||||||
|
placeholder=""
|
||||||
|
>
|
||||||
|
<el-option label="是" value="0" />
|
||||||
|
<el-option label="否" value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="签呈来源">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.source"
|
||||||
|
clearable
|
||||||
|
:placeholder="'请选择'"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in sourceList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item :label="$t('收益区域')" prop="accountStatus">
|
||||||
|
<el-cascader
|
||||||
|
v-model="address"
|
||||||
|
clearable
|
||||||
|
:options="areaData"
|
||||||
|
:placeholder="'请选择省市区'"
|
||||||
|
:props="regionParams"
|
||||||
|
@change="flChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item :label="$t('创建时间')" prop="creationTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="modifiedTime"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator=""
|
||||||
|
:start-placeholder="'开始日期'"
|
||||||
|
:end-placeholder="'结束日期'"
|
||||||
|
@change="changeTime"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item :label="$t('修改时间')" prop="creationTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="modifiedTime1"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator=""
|
||||||
|
:start-placeholder="'开始日期'"
|
||||||
|
:end-placeholder="'结束日期'"
|
||||||
|
@change="changeTime1"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="8">
|
||||||
|
<el-form-item :label="$t('生效结束时间')" prop="creationTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="effectiveTime"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator=""
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
@change="changeTime2"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="searchbox">
|
||||||
|
<el-button class="my_search" @click="research()">
|
||||||
|
{{ '搜索' }}</el-button>
|
||||||
|
<el-button class="my_reset" @click="reChongzhi">
|
||||||
|
{{ '重置' }}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="main">
|
||||||
|
<div class="maintop">
|
||||||
|
<div class="mainbtn">
|
||||||
|
<el-button
|
||||||
|
v-hasButtons="['memberRetailRegionAdd']"
|
||||||
|
size="small"
|
||||||
|
style="background-color: #48b2fd"
|
||||||
|
class="thebtn1"
|
||||||
|
@click="addRules"
|
||||||
|
>{{ '添加' }}</el-button>
|
||||||
|
<el-button
|
||||||
|
v-hasButtons="['memberRetailRegionExport']"
|
||||||
|
size="small"
|
||||||
|
class="thebtn2"
|
||||||
|
@click="handleExport"
|
||||||
|
>
|
||||||
|
{{ '导出' }}</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="maintable">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
height="730px"
|
||||||
|
style="width: 100%"
|
||||||
|
:header-cell-style="{ background: '#EEEEEE' }"
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="memberCode"
|
||||||
|
:label="$t('会员编号')"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="memberName"
|
||||||
|
:label="$t('会员姓名')"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="gradeName"
|
||||||
|
:label="$t('等级')"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="provinceVal"
|
||||||
|
width="160"
|
||||||
|
:label="$t('区域')"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.provinceVal }}{{ scope.row.cityVal
|
||||||
|
}}{{ scope.row.countyVal }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="effective"
|
||||||
|
:label="$t('是否生效')"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.effective == 0">是</span>
|
||||||
|
<span v-else>否</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="sourceVal"
|
||||||
|
:label="$t('来源')"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="creationTime"
|
||||||
|
:label="$t('创建时间')"
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="modifiedTime"
|
||||||
|
:label="$t('修改时间')"
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="effectiveEndDate"
|
||||||
|
:label="$t('生效结束时间')"
|
||||||
|
/> -->
|
||||||
|
<el-table-column align="center" :label="'操作'" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-has-buttons="['memberRetailRegionUpdate']"
|
||||||
|
class="colors"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
style="color: #ffad41"
|
||||||
|
@click.native.prevent="updateShow(scope.row)"
|
||||||
|
>
|
||||||
|
{{ $t("修改") }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-has-buttons="['memberRetailRegionDel']"
|
||||||
|
class="colors"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
style="color: #c73030"
|
||||||
|
@click.native.prevent="delRole(scope.row)"
|
||||||
|
>
|
||||||
|
{{ '删除' }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="ruleShow"
|
||||||
|
width="50%"
|
||||||
|
center
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:before-close="handleClose"
|
||||||
|
>
|
||||||
|
<el-form ref="forms" :rules="rules" :model="table" label-width="100px">
|
||||||
|
<el-form-item :label="$t('会员编号')" prop="memberCode">
|
||||||
|
<el-input
|
||||||
|
v-model="table.memberCode"
|
||||||
|
style="width: 460px"
|
||||||
|
clearable
|
||||||
|
:disabled="types == 2 ? true : false"
|
||||||
|
:placeholder="'请输入'"
|
||||||
|
@input="getmemberinfo"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('收益区域')" prop="addressd">
|
||||||
|
<el-cascader
|
||||||
|
v-model="table.addressd"
|
||||||
|
:disabled="areaDataFilter.length === 0"
|
||||||
|
style="width: 460px"
|
||||||
|
:options="areaDataFilter"
|
||||||
|
:placeholder="'请选择省市区'"
|
||||||
|
:props="regionParams"
|
||||||
|
@change="flChange1"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item :label="$t('生效结束时间')" prop="addressd">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="table.effectiveEndDate"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
type="datetime"
|
||||||
|
@change="changeTime3"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<div style="padding-top: 30px; display: flex; justify-content: center">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
class="button-style"
|
||||||
|
@click="handleClose"
|
||||||
|
>
|
||||||
|
{{ '取消' }}</el-button>
|
||||||
|
<el-button
|
||||||
|
v-preventReClick="3000"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
class="button-style"
|
||||||
|
style="margin-left: 40px; background-color: #c8161d"
|
||||||
|
@click="submitBtn()"
|
||||||
|
>
|
||||||
|
{{ '确认' }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="research"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import topBar from '@/components/topBar'
|
||||||
|
import * as con from '@/api/configManage.js'
|
||||||
|
import * as api from '@/api/manage.js'
|
||||||
|
import { Message } from 'element-ui'
|
||||||
|
import { areaList } from '@/api/site'
|
||||||
|
export default {
|
||||||
|
name: 'DistributionCenter',
|
||||||
|
components: {
|
||||||
|
topBar
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
modifiedTime: [],
|
||||||
|
modifiedTime1: [],
|
||||||
|
effectiveTime: [],
|
||||||
|
sourceList: [],
|
||||||
|
regionParams: {
|
||||||
|
label: 'name',
|
||||||
|
value: 'id',
|
||||||
|
children: 'children',
|
||||||
|
expandTrigger: 'hover'
|
||||||
|
},
|
||||||
|
title: '添加',
|
||||||
|
forms: '',
|
||||||
|
pickerOptions: {
|
||||||
|
disabledDate(time) {
|
||||||
|
const now = new Date()
|
||||||
|
now.setHours(0, 0, 0, 0) // Reset to start of today
|
||||||
|
return time.getTime() < now.getTime() // Disable only dates before today
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
memberCode: [
|
||||||
|
{ required: true, message: '请选择发布位置', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
table: {
|
||||||
|
memberCode: '',
|
||||||
|
pkMember: '',
|
||||||
|
addressd: ['', '', ''],
|
||||||
|
effectiveEndDate: ''
|
||||||
|
},
|
||||||
|
ruleShow: false,
|
||||||
|
moren: 'distributionCenter',
|
||||||
|
topList: [
|
||||||
|
{
|
||||||
|
name: '配送中心管理',
|
||||||
|
path: 'distributionCenter'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultParams: {
|
||||||
|
label: 'label',
|
||||||
|
value: 'value',
|
||||||
|
children: 'enumList'
|
||||||
|
},
|
||||||
|
multipleSelection: [],
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 50,
|
||||||
|
effective: '0'
|
||||||
|
},
|
||||||
|
gradeRangList: [],
|
||||||
|
awardsList: [],
|
||||||
|
statusList: [
|
||||||
|
{ name: '立即发送', id: '1' },
|
||||||
|
{ name: '定时发送', id: '2' }
|
||||||
|
],
|
||||||
|
statusList1: [
|
||||||
|
{ name: '未发送', id: '0' },
|
||||||
|
{ name: '已发送', id: '1' }
|
||||||
|
],
|
||||||
|
menuOptions: [],
|
||||||
|
loading: false,
|
||||||
|
tableData: [],
|
||||||
|
total: 0,
|
||||||
|
types: '',
|
||||||
|
formId: '',
|
||||||
|
getPostionList: [],
|
||||||
|
address: '',
|
||||||
|
areaData: [],
|
||||||
|
pkIds: '',
|
||||||
|
memberInfo: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
areaDataFilter() {
|
||||||
|
if (!this.memberInfo || Object.keys(this.memberInfo).length === 0 || ![80].includes(this.memberInfo.pkSettleGradeValue)) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return this.areaData
|
||||||
|
|
||||||
|
// const list = this.areaData.map(item => {
|
||||||
|
// const province = item
|
||||||
|
// let city = null
|
||||||
|
// if (province.children && province.children.length > 0) {
|
||||||
|
// city = province.children.map(child => {
|
||||||
|
// return {
|
||||||
|
// ...child,
|
||||||
|
// children: null
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// return {
|
||||||
|
// ...province,
|
||||||
|
// children: city
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// return list
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.research()
|
||||||
|
this.getsignSource()
|
||||||
|
this.getAllArea()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleExport() {
|
||||||
|
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then((_) => {
|
||||||
|
this.download(
|
||||||
|
'/member/manage/cu-member-retail-region/export',
|
||||||
|
{ ...this.queryParams, businessType: 2 },
|
||||||
|
`${this.$t('配送中心配置')}${new Date().getTime()}.xlsx`
|
||||||
|
)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getmemberinfo(member) {
|
||||||
|
con.getQueryMemberInfo({ memberCode: member }).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.table.pkMember = res.data.pkId
|
||||||
|
this.memberInfo = res.data
|
||||||
|
} else {
|
||||||
|
this.memberInfo = {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getAllArea() {
|
||||||
|
areaList().then((res) => {
|
||||||
|
this.areaData = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
flChange(value) {
|
||||||
|
this.queryParams.county = ''
|
||||||
|
this.queryParams.province = ''
|
||||||
|
this.queryParams.city = ''
|
||||||
|
|
||||||
|
this.queryParams.province = value[0]
|
||||||
|
this.queryParams.city = value[1]
|
||||||
|
this.queryParams.county = value[2]
|
||||||
|
},
|
||||||
|
flChange1(value) {
|
||||||
|
this.table.county = ''
|
||||||
|
this.table.province = ''
|
||||||
|
this.table.city = ''
|
||||||
|
this.table.province = value[0]
|
||||||
|
this.table.city = value[1]
|
||||||
|
this.table.county = value[2]
|
||||||
|
},
|
||||||
|
getsignSource() {
|
||||||
|
api.noticeWebsiteType().then((res) => {
|
||||||
|
this.sourceList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addRules() {
|
||||||
|
this.types = 1
|
||||||
|
this.ruleShow = true
|
||||||
|
this.title = '添加'
|
||||||
|
},
|
||||||
|
submitBtn() {
|
||||||
|
// 添加角色
|
||||||
|
this.ruleSubmit()
|
||||||
|
},
|
||||||
|
updateShow(item) {
|
||||||
|
this.getmemberinfo(item.memberCode)
|
||||||
|
this.types = 2
|
||||||
|
this.title = '修改'
|
||||||
|
this.table = item
|
||||||
|
let arr = [item.province + '', item.city + '']
|
||||||
|
if (item.county && item.county !== -1) {
|
||||||
|
arr.push(item.county + '')
|
||||||
|
}
|
||||||
|
arr = arr.filter((item) => item != '')
|
||||||
|
this.$set(this.table, 'addressd', arr)
|
||||||
|
this.$forceUpdate()
|
||||||
|
console.log(this.table.addressd, 'table')
|
||||||
|
this.pkIds = item.pkId
|
||||||
|
this.ruleShow = true
|
||||||
|
},
|
||||||
|
delRole(item) {
|
||||||
|
this.$confirm(this.$t('确认要删除该配置吗?'), '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
con.delRetailRegion(item.pkId).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
Message({
|
||||||
|
message: res.msg,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
this.research()
|
||||||
|
} else {
|
||||||
|
Message({
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
ruleSubmit() {
|
||||||
|
const datas = {}
|
||||||
|
const that = this
|
||||||
|
this.$refs['forms'].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
if (this.types === 1) {
|
||||||
|
datas.pkMember = this.table.pkMember
|
||||||
|
datas.province = this.table.addressd[0]
|
||||||
|
datas.city = this.table.addressd[1]
|
||||||
|
datas.county = this.table.addressd[2]
|
||||||
|
datas.effectiveEndDate = this.table.effectiveEndDate
|
||||||
|
con.retailRegionAdd(datas).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
Message({
|
||||||
|
message: res.msg,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
that.ruleShow = false
|
||||||
|
that.table = {
|
||||||
|
pkMember: '',
|
||||||
|
addressd: ['', '', '']
|
||||||
|
}
|
||||||
|
that.research()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (this.types === 2) {
|
||||||
|
datas.pkMember = this.table.pkMember
|
||||||
|
datas.pkId = this.pkIds
|
||||||
|
datas.province = this.table.addressd[0]
|
||||||
|
datas.city = this.table.addressd[1]
|
||||||
|
datas.county = this.table.addressd[2]
|
||||||
|
datas.effectiveEndDate = this.table.effectiveEndDate
|
||||||
|
con.retailRegionUpdate(datas).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
Message({
|
||||||
|
message: res.msg,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
that.ruleShow = false
|
||||||
|
that.table = {
|
||||||
|
pkMember: '',
|
||||||
|
addressd: ['', '', '']
|
||||||
|
}
|
||||||
|
that.research()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
statusChange(value) {
|
||||||
|
if (this.table.status.length > 1) {
|
||||||
|
this.table.status.splice(0, 1)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.ruleShow = false
|
||||||
|
this.table = {
|
||||||
|
pkMember: '',
|
||||||
|
addressd: ['', '', '']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeTime(value) {
|
||||||
|
this.queryParams.startDate = value[0] ? value[0] : ''
|
||||||
|
this.queryParams.endDate = value[1] ? value[1] : ''
|
||||||
|
},
|
||||||
|
changeTime1(value) {
|
||||||
|
this.queryParams.startDateModify = value[0] ? value[0] : ''
|
||||||
|
this.queryParams.endDateModify = value[1] ? value[1] : ''
|
||||||
|
},
|
||||||
|
changeTime2(value) {
|
||||||
|
this.queryParams.effectiveStaDateStr = value[0] ? value[0] : ''
|
||||||
|
this.queryParams.effectiveEndDateStr = value[1] ? value[1] : ''
|
||||||
|
},
|
||||||
|
changeTime3(value) {
|
||||||
|
this.table.effectiveEndDate = value
|
||||||
|
},
|
||||||
|
|
||||||
|
research() {
|
||||||
|
this.loading = true
|
||||||
|
con.getRetailRegionList({
|
||||||
|
...this.queryParams,
|
||||||
|
businessType: 2 // 写死 1 会员区域管理 2配送中心
|
||||||
|
}).then((res) => {
|
||||||
|
this.tableData = res.rows
|
||||||
|
this.total = res.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
reChongzhi() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 50
|
||||||
|
}
|
||||||
|
this.modifiedTime = []
|
||||||
|
this.modifiedTime1 = []
|
||||||
|
this.effectiveTime = []
|
||||||
|
this.address = []
|
||||||
|
this.research()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.multipleSelection = val
|
||||||
|
},
|
||||||
|
|
||||||
|
tableRowClassName({ row, rowIndex }) {
|
||||||
|
if (rowIndex % 2 == 1) {
|
||||||
|
return 'warning-row'
|
||||||
|
} else if (rowIndex % 2 == 0) {
|
||||||
|
return 'success-row'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-upload--picture-card {
|
||||||
|
min-width: 80px !important;
|
||||||
|
min-height: 80px !important;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
::v-deep .el-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
::v-deep .el-range-editor.el-input__inner {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
::v-deep .colors {
|
||||||
|
padding: 5px !important;
|
||||||
|
}
|
||||||
|
::v-deep .banner .el-form-item__error {
|
||||||
|
left: 100px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.avatar-uploader {
|
||||||
|
width: 68px !important;
|
||||||
|
height: 68px !important;
|
||||||
|
}
|
||||||
|
::v-deep .input-s .el-input {
|
||||||
|
//width:637px;
|
||||||
|
}
|
||||||
|
.button-style {
|
||||||
|
width: 209px;
|
||||||
|
height: 48px;
|
||||||
|
background: #cccccc;
|
||||||
|
border-radius: 5px 5px 5px 5px;
|
||||||
|
opacity: 1;
|
||||||
|
line-height: 48px;
|
||||||
|
padding: 0 !important;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
::v-deep .el-dialog__title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
::v-deep .el-dialog__header {
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
.button-s {
|
||||||
|
padding: 0 2px !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
::v-deep .el-date-editor .el-range__close-icon {
|
||||||
|
margin-top: -10px;
|
||||||
|
}
|
||||||
|
::v-deep .el-date-editor .el-range-separator {
|
||||||
|
margin-top: -10px;
|
||||||
|
}
|
||||||
|
::v-deep .el-date-editor .el-range__icon {
|
||||||
|
margin-top: -10px;
|
||||||
|
}
|
||||||
|
::v-deep .el-input__inner {
|
||||||
|
//height:28px;
|
||||||
|
//line-height: 28px;
|
||||||
|
}
|
||||||
|
::v-deep .el-form-item {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
::v-deep .el-form-item__label {
|
||||||
|
color: #333;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
::v-deep .el-row {
|
||||||
|
//margin-top: 20px;
|
||||||
|
}
|
||||||
|
::v-deep .el-table .warning-row {
|
||||||
|
background: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-table .success-row {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
::v-deep .el-table thead {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
.thebtn2 {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #ffad41;
|
||||||
|
}
|
||||||
|
.openClose {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
color: #666666;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.page {
|
||||||
|
padding: 20px;
|
||||||
|
background: #f9f9f9;
|
||||||
|
font-size: 14px;
|
||||||
|
.thetopbox {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
.searchbox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.searchtitle {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.searchbtn {
|
||||||
|
background: #08143f;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.main {
|
||||||
|
//margin-top: 20px;
|
||||||
|
background: #f9f9f9;
|
||||||
|
//border-radius: 8px;
|
||||||
|
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||||
|
|
||||||
|
.maintop {
|
||||||
|
display: flex;
|
||||||
|
padding: 0px 0;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.mainbtn {
|
||||||
|
.thebtn1 {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #3181e5;
|
||||||
|
width: 68px;
|
||||||
|
//height: 32px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -108,13 +108,6 @@
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="maintop">
|
<div class="maintop">
|
||||||
<div class="mainbtn">
|
<div class="mainbtn">
|
||||||
<el-button
|
|
||||||
v-hasButtons="['memberRetailRegionAdd']"
|
|
||||||
size="small"
|
|
||||||
style="background-color: #48b2fd"
|
|
||||||
class="thebtn1"
|
|
||||||
@click="addRules"
|
|
||||||
>{{ '添加' }}</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-hasButtons="['memberRetailRegionExport']"
|
v-hasButtons="['memberRetailRegionExport']"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -132,7 +125,6 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:header-cell-style="{ background: '#EEEEEE' }"
|
:header-cell-style="{ background: '#EEEEEE' }"
|
||||||
:row-class-name="tableRowClassName"
|
:row-class-name="tableRowClassName"
|
||||||
:span-method="objectSpanMethod"
|
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
|
@ -189,98 +181,9 @@
|
||||||
:label="$t('修改时间')"
|
:label="$t('修改时间')"
|
||||||
width="160"
|
width="160"
|
||||||
/>
|
/>
|
||||||
<!-- <el-table-column
|
|
||||||
align="center"
|
|
||||||
prop="effectiveEndDate"
|
|
||||||
:label="$t('生效结束时间')"
|
|
||||||
/> -->
|
|
||||||
<el-table-column align="center" :label="'操作'" width="150">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
v-has-buttons="['memberRetailRegionUpdate']"
|
|
||||||
class="colors"
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
style="color: #ffad41"
|
|
||||||
@click.native.prevent="updateShow(scope.row)"
|
|
||||||
>
|
|
||||||
{{ $t("修改") }}
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
v-has-buttons="['memberRetailRegionDel']"
|
|
||||||
class="colors"
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
style="color: #c73030"
|
|
||||||
@click.native.prevent="delRole(scope.row)"
|
|
||||||
>
|
|
||||||
{{ '删除' }}
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="ruleShow"
|
|
||||||
width="50%"
|
|
||||||
center
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
:before-close="handleClose"
|
|
||||||
>
|
|
||||||
<el-form ref="forms" :rules="rules" :model="table" label-width="100px">
|
|
||||||
<el-form-item :label="$t('会员编号')" prop="memberCode">
|
|
||||||
<el-input
|
|
||||||
v-model="table.memberCode"
|
|
||||||
style="width: 460px"
|
|
||||||
clearable
|
|
||||||
:disabled="types == 2 ? true : false"
|
|
||||||
:placeholder="'请输入'"
|
|
||||||
@input="getmemberinfo"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('收益区域')" prop="addressd">
|
|
||||||
<el-cascader
|
|
||||||
v-model="table.addressd"
|
|
||||||
:disabled="areaDataFilter.length === 0"
|
|
||||||
style="width: 460px"
|
|
||||||
:options="areaDataFilter"
|
|
||||||
:placeholder="'请选择省市区'"
|
|
||||||
:props="regionParams"
|
|
||||||
@change="flChange1"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item :label="$t('生效结束时间')" prop="addressd">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="table.effectiveEndDate"
|
|
||||||
:picker-options="pickerOptions"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="datetime"
|
|
||||||
@change="changeTime3"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<div style="padding-top: 30px; display: flex; justify-content: center">
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
class="button-style"
|
|
||||||
@click="handleClose"
|
|
||||||
>
|
|
||||||
{{ '取消' }}</el-button>
|
|
||||||
<el-button
|
|
||||||
v-preventReClick="3000"
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
class="button-style"
|
|
||||||
style="margin-left: 40px; background-color: #c8161d"
|
|
||||||
@click="submitBtn()"
|
|
||||||
>
|
|
||||||
{{ '确认' }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
</el-dialog>
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
|
@ -293,19 +196,13 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import topBar from '@/components/topBar'
|
import topBar from '@/components/topBar'
|
||||||
import { getbdmenuList, getPubenumsList } from '@/api/system'
|
|
||||||
import { getgradeRanglist, getAwardsListChiose } from '@/api/level'
|
|
||||||
import * as con from '@/api/configManage.js'
|
import * as con from '@/api/configManage.js'
|
||||||
import * as api from '@/api/manage.js'
|
import * as api from '@/api/manage.js'
|
||||||
import { Message } from 'element-ui'
|
|
||||||
import { deleteAgreement } from '@/api/configManage'
|
|
||||||
import ImageUpload from '@/components/ImageUpload'
|
|
||||||
import { areaList } from '@/api/site'
|
import { areaList } from '@/api/site'
|
||||||
export default {
|
export default {
|
||||||
name: 'Qxpz',
|
name: 'MemberRetailRegion',
|
||||||
components: {
|
components: {
|
||||||
topBar,
|
topBar
|
||||||
ImageUpload
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -343,7 +240,7 @@ export default {
|
||||||
moren: 'memberRetailRegion',
|
moren: 'memberRetailRegion',
|
||||||
topList: [
|
topList: [
|
||||||
{
|
{
|
||||||
name: this.$t('收益区域配置'),
|
name: '会员区域信息',
|
||||||
path: 'memberRetailRegion'
|
path: 'memberRetailRegion'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -387,28 +284,25 @@ export default {
|
||||||
if (!this.memberInfo || Object.keys(this.memberInfo).length === 0 || ![60, 70, 80].includes(this.memberInfo.pkSettleGradeValue)) {
|
if (!this.memberInfo || Object.keys(this.memberInfo).length === 0 || ![60, 70, 80].includes(this.memberInfo.pkSettleGradeValue)) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
console.log(this.memberInfo.pkSettleGradeValue, 'memberInfo')
|
|
||||||
if ([60, 70].includes(this.memberInfo.pkSettleGradeValue)) {
|
|
||||||
return this.areaData
|
return this.areaData
|
||||||
}
|
|
||||||
|
|
||||||
const list = this.areaData.map(item => {
|
// const list = this.areaData.map(item => {
|
||||||
const province = item
|
// const province = item
|
||||||
let city = null
|
// let city = null
|
||||||
if (province.children && province.children.length > 0) {
|
// if (province.children && province.children.length > 0) {
|
||||||
city = province.children.map(child => {
|
// city = province.children.map(child => {
|
||||||
return {
|
// return {
|
||||||
...child,
|
// ...child,
|
||||||
children: null
|
// children: null
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
return {
|
// return {
|
||||||
...province,
|
// ...province,
|
||||||
children: city
|
// children: city
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
return list
|
// return list
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -425,8 +319,8 @@ export default {
|
||||||
}).then((_) => {
|
}).then((_) => {
|
||||||
this.download(
|
this.download(
|
||||||
'/member/manage/cu-member-retail-region/export',
|
'/member/manage/cu-member-retail-region/export',
|
||||||
{ ...this.queryParams },
|
{ ...this.queryParams, businessType: 1 },
|
||||||
`${this.$t('会员收益区域配置')}}${new Date().getTime()}.xlsx`
|
`${this.$t('会员区域信息')}${new Date().getTime()}.xlsx`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -454,136 +348,13 @@ export default {
|
||||||
this.queryParams.city = value[1]
|
this.queryParams.city = value[1]
|
||||||
this.queryParams.county = value[2]
|
this.queryParams.county = value[2]
|
||||||
},
|
},
|
||||||
flChange1(value) {
|
|
||||||
this.table.county = ''
|
|
||||||
this.table.province = ''
|
|
||||||
this.table.city = ''
|
|
||||||
this.table.province = value[0]
|
|
||||||
this.table.city = value[1]
|
|
||||||
this.table.county = value[2]
|
|
||||||
},
|
|
||||||
getsignSource() {
|
getsignSource() {
|
||||||
api.noticeWebsiteType().then((res) => {
|
api.noticeWebsiteType().then((res) => {
|
||||||
this.sourceList = res.data
|
this.sourceList = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addRules() {
|
|
||||||
this.types = 1
|
|
||||||
this.ruleShow = true
|
|
||||||
this.title = '添加'
|
|
||||||
},
|
|
||||||
submitBtn() {
|
|
||||||
// 添加角色
|
|
||||||
this.ruleSubmit()
|
|
||||||
},
|
|
||||||
updateShow(item) {
|
|
||||||
this.getmemberinfo(item.memberCode)
|
|
||||||
this.types = 2
|
|
||||||
this.title = '修改'
|
|
||||||
this.table = item
|
|
||||||
let arr = [item.province + '', item.city + '']
|
|
||||||
if (item.county && item.county !== -1) {
|
|
||||||
arr.push(item.county + '')
|
|
||||||
}
|
|
||||||
arr = arr.filter((item) => item != '')
|
|
||||||
this.$set(this.table, 'addressd', arr)
|
|
||||||
this.$forceUpdate()
|
|
||||||
console.log(this.table.addressd, 'table')
|
|
||||||
this.pkIds = item.pkId
|
|
||||||
this.ruleShow = true
|
|
||||||
},
|
|
||||||
delRole(item) {
|
|
||||||
this.$confirm(this.$t('确认要删除该配置吗?'), '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
con.delRetailRegion(item.pkId).then((res) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
Message({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
this.research()
|
|
||||||
} else {
|
|
||||||
Message({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
ruleSubmit() {
|
|
||||||
const datas = {}
|
|
||||||
const that = this
|
|
||||||
this.$refs['forms'].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return false
|
|
||||||
} else {
|
|
||||||
if (this.types === 1) {
|
|
||||||
datas.pkMember = this.table.pkMember
|
|
||||||
datas.province = this.table.addressd[0]
|
|
||||||
datas.city = this.table.addressd[1]
|
|
||||||
datas.county = this.table.addressd[2]
|
|
||||||
datas.effectiveEndDate = this.table.effectiveEndDate
|
|
||||||
con.retailRegionAdd(datas).then((res) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
Message({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
that.ruleShow = false
|
|
||||||
that.table = {
|
|
||||||
pkMember: '',
|
|
||||||
addressd: ['', '', '']
|
|
||||||
}
|
|
||||||
that.research()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (this.types === 2) {
|
|
||||||
datas.pkMember = this.table.pkMember
|
|
||||||
datas.pkId = this.pkIds
|
|
||||||
datas.province = this.table.addressd[0]
|
|
||||||
datas.city = this.table.addressd[1]
|
|
||||||
datas.county = this.table.addressd[2]
|
|
||||||
datas.effectiveEndDate = this.table.effectiveEndDate
|
|
||||||
con.retailRegionUpdate(datas).then((res) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
Message({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
that.ruleShow = false
|
|
||||||
that.table = {
|
|
||||||
pkMember: '',
|
|
||||||
addressd: ['', '', '']
|
|
||||||
}
|
|
||||||
that.research()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
statusChange(value) {
|
|
||||||
if (this.table.status.length > 1) {
|
|
||||||
this.table.status.splice(0, 1)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleClose() {
|
|
||||||
this.ruleShow = false
|
|
||||||
this.table = {
|
|
||||||
pkMember: '',
|
|
||||||
addressd: ['', '', '']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
changeBox(row) {
|
|
||||||
console.error(row)
|
|
||||||
},
|
|
||||||
addFrom() {},
|
|
||||||
addRule() {},
|
|
||||||
changeTime(value) {
|
changeTime(value) {
|
||||||
this.queryParams.startDate = value[0] ? value[0] : ''
|
this.queryParams.startDate = value[0] ? value[0] : ''
|
||||||
this.queryParams.endDate = value[1] ? value[1] : ''
|
this.queryParams.endDate = value[1] ? value[1] : ''
|
||||||
|
@ -596,51 +367,13 @@ export default {
|
||||||
this.queryParams.effectiveStaDateStr = value[0] ? value[0] : ''
|
this.queryParams.effectiveStaDateStr = value[0] ? value[0] : ''
|
||||||
this.queryParams.effectiveEndDateStr = value[1] ? value[1] : ''
|
this.queryParams.effectiveEndDateStr = value[1] ? value[1] : ''
|
||||||
},
|
},
|
||||||
changeTime3(value) {
|
|
||||||
this.table.effectiveEndDate = value
|
|
||||||
},
|
|
||||||
disabledDates(time) {
|
|
||||||
const now = new Date() // 当前时间
|
|
||||||
const currentDateTime = new Date(
|
|
||||||
now.getFullYear(),
|
|
||||||
now.getMonth(),
|
|
||||||
now.getDate(),
|
|
||||||
now.getHours(),
|
|
||||||
now.getMinutes(),
|
|
||||||
now.getSeconds()
|
|
||||||
)
|
|
||||||
return time.getTime() < currentDateTime.getTime() // 禁止当前时间之前的日期和时间
|
|
||||||
},
|
|
||||||
handleChangeMunu(value) {
|
|
||||||
console.log('🌈', value[value.length - 1])
|
|
||||||
this.queryParams.menuId = value[value.length - 1]
|
|
||||||
},
|
|
||||||
// 菜单下拉选
|
|
||||||
getPubenumsList() {
|
|
||||||
getPubenumsList().then((res) => {
|
|
||||||
this.menuOptions = res.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 等级范围选择
|
|
||||||
getgradeRanglist() {
|
|
||||||
getgradeRanglist().then((res) => {
|
|
||||||
this.gradeRangList = res.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 奖衔下拉列表
|
|
||||||
getAwardsListChiose() {
|
|
||||||
getAwardsListChiose().then((res) => {
|
|
||||||
this.awardsList = res.rows
|
|
||||||
})
|
|
||||||
},
|
|
||||||
research() {
|
research() {
|
||||||
// // 日期传入改为起止两个字段
|
|
||||||
// if ("" != this.queryParams.creationTime) {
|
|
||||||
// this.queryParams.creationTimeStart = this.queryParams.creationTime[0];
|
|
||||||
// this.queryParams.creationTimeEnd = this.queryParams.creationTime[1];
|
|
||||||
// }
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
con.getRetailRegionList(this.queryParams).then((res) => {
|
con.getRetailRegionList({
|
||||||
|
...this.queryParams,
|
||||||
|
businessType: 1 // 写死 1 会员区域管理 2配送中心
|
||||||
|
}).then((res) => {
|
||||||
this.tableData = res.rows
|
this.tableData = res.rows
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
@ -661,21 +394,6 @@ export default {
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.multipleSelection = val
|
this.multipleSelection = val
|
||||||
},
|
},
|
||||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
||||||
// if (columnIndex === 0) {
|
|
||||||
// if (rowIndex % 2 === 0) {
|
|
||||||
// return {
|
|
||||||
// rowspan: 2,
|
|
||||||
// colspan: 1,
|
|
||||||
// };
|
|
||||||
// } else {
|
|
||||||
// return {
|
|
||||||
// rowspan: 0,
|
|
||||||
// colspan: 0,
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
tableRowClassName({ row, rowIndex }) {
|
tableRowClassName({ row, rowIndex }) {
|
||||||
if (rowIndex % 2 == 1) {
|
if (rowIndex % 2 == 1) {
|
||||||
return 'warning-row'
|
return 'warning-row'
|
||||||
|
|
Loading…
Reference in New Issue