|
@@ -0,0 +1,674 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <div class="filter-container" style="margin-bottom: 20px">
|
|
|
+ 用户名称:
|
|
|
+ <el-input
|
|
|
+ v-model="condition.name"
|
|
|
+ clearable
|
|
|
+ placeholder="用户名称"
|
|
|
+ style="width: 200px; margin-right: 20px"
|
|
|
+ class="filter-item"
|
|
|
+ />
|
|
|
+ 用户角色:
|
|
|
+ <el-input
|
|
|
+ v-model="condition.activityId"
|
|
|
+ clearable
|
|
|
+ placeholder="用户角色"
|
|
|
+ style="width: 200px; margin-right: 20px"
|
|
|
+ class="filter-item"
|
|
|
+ />
|
|
|
+ 用户状态:
|
|
|
+ <el-select
|
|
|
+ v-model="condition.source"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ value-key="value"
|
|
|
+ style="width: 200px; margin-right: 20px"
|
|
|
+ placeholder=""
|
|
|
+ class="filter-item"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in typeSource"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button
|
|
|
+ class="filter-item"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="search"
|
|
|
+ >
|
|
|
+ 搜索
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ class="filter-item"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-refresh-right"
|
|
|
+ @click="resetInput"
|
|
|
+ >
|
|
|
+ 重置
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ class="filter-item"
|
|
|
+ type="danger"
|
|
|
+ icon="el-icon-circle-plus-outline"
|
|
|
+ @click="add"
|
|
|
+ >
|
|
|
+ 新增用户
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :key="tableKey"
|
|
|
+ v-loading="listLoading"
|
|
|
+ :data="couponEventList"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column label="用户ID" align="center" width="150" fixed="left">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.activityId }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="名称" align="center" fixed="left">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.name }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="账号" align="center" fixed="left">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.name }}hsay</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="密码" align="center" fixed="left">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.name }}123456</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="状态" align="center">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ {{ row.status.showText }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="备注" align="center" fixed="left">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.name }}测试</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="角色" align="center" fixed="left">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.name }}用户</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="创建时间"
|
|
|
+ align="center"
|
|
|
+ width="100"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.createdAt }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ width="300"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-button type="info" size="mini" @click="saveRowDataStock(row)">
|
|
|
+ 绑定角色
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="updateDetail(row)">
|
|
|
+ 修改
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="row.isOnline == 1"
|
|
|
+ type="success"
|
|
|
+ size="mini"
|
|
|
+ @click="editOnLine(row)"
|
|
|
+ >
|
|
|
+ 已启用
|
|
|
+ </el-button>
|
|
|
+ <el-button v-else type="danger" size="mini" @click="editOnLine(row)">
|
|
|
+ 已禁用
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ :background="background"
|
|
|
+ :current-page="queryForm.pageNo"
|
|
|
+ :layout="layout"
|
|
|
+ :page-size="queryForm.pageSize"
|
|
|
+ :total="total"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ ></el-pagination>
|
|
|
+ <el-dialog title="活动权重" :visible.sync="dialogFormCoupon" width="20%">
|
|
|
+ <el-form :model="form">
|
|
|
+ <el-form-item label="" label-width="10%">
|
|
|
+ <span>请输入活动权重: 权重大于0展示在首页</span>
|
|
|
+ <el-input
|
|
|
+ v-model="form.weight"
|
|
|
+ autocomplete="off"
|
|
|
+ type="number"
|
|
|
+ placeholder="请输入权重"
|
|
|
+ oninput="value=value.replace(/[^\d]/g,'');if(value.length>5)value=value.slice(0,5)"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormCoupon = false">取 消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="
|
|
|
+ dialogFormCoupon = false
|
|
|
+ editWeight(form.weight)
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 确 定
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="增加库存"
|
|
|
+ :visible.sync="dialogFormCouponStock"
|
|
|
+ width="20%"
|
|
|
+ >
|
|
|
+ <el-form :model="form">
|
|
|
+ <el-form-item label="" label-width="10%">
|
|
|
+ <span>输入要增加的库存数</span>
|
|
|
+ <el-input
|
|
|
+ v-model="form.addStock"
|
|
|
+ autocomplete="off"
|
|
|
+ type="number"
|
|
|
+ placeholder="请输入要增加的库存数"
|
|
|
+ oninput="value=value.replace(/[^\d]/g,'');if(value.length>9)value=value.slice(0,9)"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormCouponStock = false">取 消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="
|
|
|
+ dialogFormCouponStock = false
|
|
|
+ editAddStock(form.addStock)
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 确 定
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="设置轮次"
|
|
|
+ :visible.sync="dialogFormCouponRound"
|
|
|
+ width="20%"
|
|
|
+ >
|
|
|
+ <el-form :model="form">
|
|
|
+ <el-form-item label="" label-width="10%">
|
|
|
+ <span>设置轮次</span>
|
|
|
+ <el-input
|
|
|
+ v-model="form.round"
|
|
|
+ autocomplete="off"
|
|
|
+ type="number"
|
|
|
+ placeholder="请输入轮次"
|
|
|
+ oninput="value=value.replace(/[^\d]/g,'');if(value.length>4)value=value.slice(0,4)"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormCouponRound = false">取 消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="
|
|
|
+ dialogFormCouponRound = false
|
|
|
+ editRound(form.round)
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 确 定
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="补货数量" :visible.sync="dialogFormScript" width="20%">
|
|
|
+ <el-form ref="dataForm" :model="form">
|
|
|
+ <el-form-item label="" label-width="10%">
|
|
|
+ <span>输入补货数量</span>
|
|
|
+ <el-input
|
|
|
+ v-model="form.supplement"
|
|
|
+ autocomplete="off"
|
|
|
+ type="number"
|
|
|
+ placeholder="请输入补货数量"
|
|
|
+ oninput="value=value.replace(/[^\d]/g,'');if(value.length>9)value=value.slice(0,9)"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormScript = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="editAddScript(form.supplement)">
|
|
|
+ 确 定
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import {
|
|
|
+ getCouponEventList,
|
|
|
+ changeCouponEventStatus,
|
|
|
+ activityCacheRefresh,
|
|
|
+ getCouponSNInfo,
|
|
|
+ getSourceListApi,
|
|
|
+ editActivityOnlineStatus,
|
|
|
+ sendCouponSn,
|
|
|
+ editActivity,
|
|
|
+ updateScript,
|
|
|
+ executeCript,
|
|
|
+ } from '../../axios/api'
|
|
|
+ import { Message } from 'element-ui'
|
|
|
+ import http from '../../axios/http'
|
|
|
+ import { isPhone } from '@/utils/validate'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: 'UserinfoList',
|
|
|
+ components: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableKey: 0,
|
|
|
+ couponEventListString: '',
|
|
|
+ couponEventList: [],
|
|
|
+ listLoading: true,
|
|
|
+ layout: 'total, sizes, prev, pager, next, jumper',
|
|
|
+ total: 0,
|
|
|
+ dialogFormVisible: false,
|
|
|
+ dialogFormCoupon: false,
|
|
|
+ dialogFormCouponStock: false,
|
|
|
+ dialogFormScript: false,
|
|
|
+ condition: {
|
|
|
+ name: null,
|
|
|
+ source: null,
|
|
|
+ activityId: null,
|
|
|
+ },
|
|
|
+ queryForm: {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ title: '',
|
|
|
+ },
|
|
|
+ timeRange: [],
|
|
|
+ background: true,
|
|
|
+ form: {
|
|
|
+ weight: 0,
|
|
|
+ addStock: 0,
|
|
|
+ round: 0,
|
|
|
+ supplement: 0,
|
|
|
+ sn: '',
|
|
|
+ couponId: '',
|
|
|
+ beginTimestamp: '',
|
|
|
+ endTimestamp: '',
|
|
|
+ coupon: {
|
|
|
+ title: '',
|
|
|
+ },
|
|
|
+ mobile: '',
|
|
|
+ state: {
|
|
|
+ showText: '',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ typeSource: [],
|
|
|
+ rowData: {},
|
|
|
+ dialogFormCouponRound: false,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.loadData()
|
|
|
+ this.geSourceList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ geSourceList() {
|
|
|
+ const data = {
|
|
|
+ page: 1,
|
|
|
+ pageSize: 1000,
|
|
|
+ }
|
|
|
+ getSourceListApi(data)
|
|
|
+ .then((res) => {
|
|
|
+ let result = res.data.data
|
|
|
+ console.log(result)
|
|
|
+ let sourceList = result.list
|
|
|
+ let typeSource = [
|
|
|
+ {
|
|
|
+ value: null,
|
|
|
+ label: '全部',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+
|
|
|
+ for (let i in sourceList) {
|
|
|
+ typeSource.push({
|
|
|
+ value: sourceList[i]['sourceValue'],
|
|
|
+ label: sourceList[i]['sourceValue'],
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.typeSource = typeSource
|
|
|
+ })
|
|
|
+ .catch((err) => Message.error(err))
|
|
|
+ },
|
|
|
+ loadData() {
|
|
|
+ for (let key in this.condition) {
|
|
|
+ this.condition[key] = this.condition[key] ? this.condition[key] : null
|
|
|
+ }
|
|
|
+ const data = {
|
|
|
+ nextPage: this.queryForm.pageNo,
|
|
|
+ pageSize: this.queryForm.pageSize,
|
|
|
+ condition: this.condition,
|
|
|
+ }
|
|
|
+ let couponEventList = []
|
|
|
+ if (this.couponEventListString !== '') {
|
|
|
+ couponEventList = this.couponEventListString.split(',')
|
|
|
+ data.couponEventList = couponEventList
|
|
|
+ }
|
|
|
+ getCouponEventList(data)
|
|
|
+ .then((res) => {
|
|
|
+ let result = res.data.data
|
|
|
+ this.couponEventList = result.list
|
|
|
+ this.total = result.count
|
|
|
+ this.listLoading = false
|
|
|
+ })
|
|
|
+ .catch((err) => Message.error(err))
|
|
|
+ },
|
|
|
+ resetData() {
|
|
|
+ this.condition.name = null
|
|
|
+ this.condition.source = null
|
|
|
+ },
|
|
|
+ search: function () {
|
|
|
+ this.loadData()
|
|
|
+ },
|
|
|
+ resetInput: function () {
|
|
|
+ this.resetData()
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.queryForm.pageSize = val
|
|
|
+ this.loadData()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.queryForm.pageNo = val
|
|
|
+ this.loadData()
|
|
|
+ },
|
|
|
+ appletSet(row) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/signIn/appletCodeSet',
|
|
|
+ query: { activityId: row.activityId },
|
|
|
+ })
|
|
|
+ },
|
|
|
+ deleteButton(row) {
|
|
|
+ this.$confirm('此操作将永久删除活动, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.handleEdit(row)
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'info',
|
|
|
+ // message: '已取消删除',
|
|
|
+ // })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleEdit(row) {
|
|
|
+ let data = {
|
|
|
+ activityId: row.activityId,
|
|
|
+ }
|
|
|
+ changeCouponEventStatus(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.loadData()
|
|
|
+ Message.success('删除成功')
|
|
|
+ })
|
|
|
+ .catch((err) => Message.error(err))
|
|
|
+ },
|
|
|
+ //修改活动的上下架的流程
|
|
|
+ editOnLine(row) {
|
|
|
+ let data = {
|
|
|
+ activityId: row.activityId,
|
|
|
+ }
|
|
|
+ this.listLoading = true
|
|
|
+ editActivityOnlineStatus(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.loadData()
|
|
|
+ Message.success('更新成功')
|
|
|
+ })
|
|
|
+ .catch((err) => Message.error(err))
|
|
|
+ },
|
|
|
+ add() {
|
|
|
+ this.$router.push('/userInfo/addUserInfo')
|
|
|
+ },
|
|
|
+ updateDetail(row) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/userInfo/addUserInfo',
|
|
|
+ query: { copyActivityId: row.activityId, editType: '1' },
|
|
|
+ })
|
|
|
+ },
|
|
|
+ refresh(source) {
|
|
|
+ activityCacheRefresh(source)
|
|
|
+ .then((res) => {
|
|
|
+ this.loadData()
|
|
|
+ Message.success('刷新成功')
|
|
|
+ })
|
|
|
+ .catch((err) => Message.error(err))
|
|
|
+ },
|
|
|
+ editWeight(weight) {
|
|
|
+ if (null === weight || weight === '' || weight === undefined) {
|
|
|
+ this.$message({
|
|
|
+ message: '活动权重不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ activityId: this.rowData.activityId,
|
|
|
+ weight: weight,
|
|
|
+ }
|
|
|
+ editActivity(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.loadData()
|
|
|
+ Message.success('活动权重设置成功!')
|
|
|
+ })
|
|
|
+ .catch((err) => Message.error(err))
|
|
|
+ },
|
|
|
+
|
|
|
+ editAddStock(addStock) {
|
|
|
+ if (null === addStock || addStock === '' || addStock === undefined) {
|
|
|
+ this.$message({
|
|
|
+ message: '添加库存不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ activityId: this.rowData.activityId,
|
|
|
+ addStock: addStock,
|
|
|
+ }
|
|
|
+ editActivity(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.loadData()
|
|
|
+ Message.success('添加库存设置成功!')
|
|
|
+ })
|
|
|
+ .catch((err) => Message.error(err))
|
|
|
+ },
|
|
|
+ editRound(round) {
|
|
|
+ if (null === round || round === '' || round === undefined) {
|
|
|
+ this.$message({
|
|
|
+ message: '轮次不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ activityId: this.rowData.activityId,
|
|
|
+ round: round,
|
|
|
+ }
|
|
|
+ editActivity(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.loadData()
|
|
|
+ Message.success('轮次设置成功!')
|
|
|
+ })
|
|
|
+ .catch((err) => Message.error(err))
|
|
|
+ },
|
|
|
+
|
|
|
+ editAddScript(supplement) {
|
|
|
+ if (
|
|
|
+ null === supplement ||
|
|
|
+ supplement === '' ||
|
|
|
+ supplement === undefined
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '补货数量不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.dialogFormScript = false
|
|
|
+ let data = {
|
|
|
+ activityId: this.rowData.activityId,
|
|
|
+ script: 1,
|
|
|
+ supplement: supplement,
|
|
|
+ }
|
|
|
+ updateScript(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.loadData()
|
|
|
+ Message.success('脚本设置成功!')
|
|
|
+ })
|
|
|
+ .catch((err) => Message.error(err))
|
|
|
+ },
|
|
|
+ editScriptClose(row) {
|
|
|
+ let data = {
|
|
|
+ activityId: row.activityId,
|
|
|
+ script: 0,
|
|
|
+ }
|
|
|
+ this.listLoading = true
|
|
|
+ updateScript(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.loadData()
|
|
|
+ Message.success('脚本关闭成功')
|
|
|
+ })
|
|
|
+ .catch((err) => Message.error(err))
|
|
|
+ },
|
|
|
+ // editInfo(row) {
|
|
|
+ // let data = {
|
|
|
+ // activityId: row.activityId,
|
|
|
+ // script: 0,
|
|
|
+ // }
|
|
|
+ // this.listLoading = true
|
|
|
+ // executeCript(data)
|
|
|
+ // .then((res) => {
|
|
|
+ // this.loadData()
|
|
|
+ // Message.success('脚本关闭成功')
|
|
|
+ // })
|
|
|
+ // .catch((err) => Message.error(err))
|
|
|
+ // },
|
|
|
+ formatTime: function (timeStamp) {
|
|
|
+ if (!timeStamp || timeStamp.length === 0) {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ let time = new Date(timeStamp)
|
|
|
+ let y = time.getFullYear()
|
|
|
+ let m = time.getMonth() + 1
|
|
|
+ let d = time.getDate()
|
|
|
+ let h = time.getHours()
|
|
|
+ let mm = time.getMinutes()
|
|
|
+ let s = time.getSeconds()
|
|
|
+ return (
|
|
|
+ y +
|
|
|
+ '-' +
|
|
|
+ this.fixed0(m) +
|
|
|
+ '-' +
|
|
|
+ this.fixed0(d) +
|
|
|
+ ' ' +
|
|
|
+ this.fixed0(h) +
|
|
|
+ ':' +
|
|
|
+ this.fixed0(mm) +
|
|
|
+ ':' +
|
|
|
+ this.fixed0(s)
|
|
|
+ )
|
|
|
+ },
|
|
|
+ fixed0: function (m) {
|
|
|
+ return m < 10 ? '0' + m : m
|
|
|
+ },
|
|
|
+ saveRowData(row) {
|
|
|
+ this.dialogFormCoupon = true
|
|
|
+ this.form.weight = row.weight
|
|
|
+ this.rowData = row
|
|
|
+ },
|
|
|
+ saveRowDataStock(row) {
|
|
|
+ this.dialogFormCouponStock = true
|
|
|
+
|
|
|
+ this.rowData = row
|
|
|
+ },
|
|
|
+ saveRowDataRound(row) {
|
|
|
+ this.dialogFormCouponRound = true
|
|
|
+ this.form.round = row.round
|
|
|
+ this.rowData = row
|
|
|
+ },
|
|
|
+ editScript(row) {
|
|
|
+ this.rowData = Object.assign(row)
|
|
|
+ this.dialogFormScript = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs['dataForm'].clearValidate()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ renderHeader(h, { column }) {
|
|
|
+ const paymentContent = h(
|
|
|
+ 'div',
|
|
|
+ {
|
|
|
+ slot: 'content',
|
|
|
+ },
|
|
|
+ '0不显示,1-99更多,>99首页'
|
|
|
+ )
|
|
|
+ return h('div', [
|
|
|
+ h('span', column.label),
|
|
|
+ h(
|
|
|
+ 'el-tooltip',
|
|
|
+ {
|
|
|
+ props: {
|
|
|
+ placement: 'bottom',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ [
|
|
|
+ column.label != '权重' ? '' : paymentContent,
|
|
|
+ h('i', {
|
|
|
+ class: 'el-icon-warning-outline',
|
|
|
+ style: 'color:orange;margin-left:5px;',
|
|
|
+ }),
|
|
|
+ ]
|
|
|
+ ),
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+ .cell {
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ /*width: 200px;*/
|
|
|
+ height: 50px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dropdown-style {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+</style>
|