diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index 20aafb07..4bef6a64 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -1,9 +1,9 @@ /* 营销计划列表 */ -import ReactDOM from "react-dom"; -import React, { Component } from "react"; -import { HashRouter as Router, Route, Link } from "react-router-dom"; -import { Button, Alert } from "zent"; -import "./list.less"; +import ReactDOM from 'react-dom' +import React, { Component } from 'react' +import { HashRouter as Router, Route, Link } from 'react-router-dom' +import { Button, Alert } from 'zent' +import './list.less' import { Input, openDialog, @@ -20,13 +20,13 @@ import { MenuItem, DropdownContent, Menu, - Sweetalert, -} from "zent"; -import "../../../assets/comm.css"; -import Ipt from "../../../components/input/main"; -import Grid from "../../../components/gird/main.js"; -import TabPage from "../../../components/tabPage/main.js"; -import Filterbar from "../../../components/filterbar/main.js"; + Sweetalert +} from 'zent' +import '../../../assets/comm.css' +import Ipt from '../../../components/input/main' +import Grid from '../../../components/gird/main.js' +import TabPage from '../../../components/tabPage/main.js' +import Filterbar from '../../../components/filterbar/main.js' import { planIsSend, planCancel, @@ -39,48 +39,48 @@ import { planSend, planResend, planReceive, - getReseller, -} from "../../../assets/api.js"; -import _ from "lodash"; -import menu from "../../../assets/enum.js"; -const PAGE_SIZE_OPTIONS = [10, 20, 30]; + getReseller +} from '../../../assets/api.js' +import _ from 'lodash' +import menu from '../../../assets/enum.js' +const PAGE_SIZE_OPTIONS = [10, 20, 30] export default class acclist extends React.Component { constructor(props) { - super(props); + super(props) this.state = { dataCount: 0, page: 1, limit: 10, - tabList: [{ title: "营销计划列表" }], + tabList: [{ title: '营销计划列表' }], distdata: [], filterList: [ { id: 0, - label: "状态", - prop: "status", + label: '状态', + prop: 'status', menuList: [ - { id: 999, name: "全部" }, - { id: 0, name: "创建中" }, - { id: 2, name: "审核中" }, - { id: 3, name: "待生效" }, - { id: 4, name: "进行中" }, - { id: 5, name: "暂停中" }, - { id: 6, name: "已完结" }, - { id: 7, name: "未通过" }, - { id: 8, name: "已作废" }, - ], - }, + { id: 999, name: '全部' }, + { id: 0, name: '创建中' }, + { id: 2, name: '审核中' }, + { id: 3, name: '待生效' }, + { id: 4, name: '进行中' }, + { id: 5, name: '暂停中' }, + { id: 6, name: '已完结' }, + { id: 7, name: '未通过' }, + { id: 8, name: '已作废' } + ] + } ], tableHeight: 500, - menuList: [{ id: 0, name: "状态", check: false }], + menuList: [{ id: 0, name: '状态', check: false }], phone_list: [], email_list: [], - phone: "", - email: "", + phone: '', + email: '', email_radio: -1, phone_radio: -1, - key_word: "", + key_word: '', audit_visible: false, cur_item: null, @@ -94,28 +94,28 @@ export default class acclist extends React.Component { usage_total: 0, silent_total: 0, isSend: true, - isCancel: false, - }; + isCancel: false + } } clickFn() { let link = window.location.href.replace( window.location.hash, - "#/home/plan-create" - ); - window.open(link, "_blank"); + '#/home/plan-create' + ) + window.open(link, '_blank') } //分页 onPageChange(e) { - this.setState({ page: e }); + this.setState({ page: e }) setTimeout(() => { - this.getpageFn(); - }, 0); + this.getpageFn() + }, 0) } send(e) { - let phoneReg = new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$"); - let emailReg = new RegExp("w+@w+.w+(.w+){0,1}"); + let phoneReg = new RegExp('^[1][3,4,5,6,7,8,9][0-9]{9}$') + let emailReg = new RegExp('w+@w+.w+(.w+){0,1}') - let plan_id = this.state.plan_id; + let plan_id = this.state.plan_id let data = { phone: this.state.phone_radio > -1 @@ -124,208 +124,208 @@ export default class acclist extends React.Component { email: this.state.email_radio > -1 ? this.state.email_list[this.state.email_radio] - : this.state.email, - }; + : this.state.email + } if (!phoneReg.test(data.phone)) { - Notify.error("手机号格式不正确"); - return; + Notify.error('手机号格式不正确') + return } planSend(plan_id, data).then((res) => { handelResponse( res, (req, msg) => { - this.setState({ audit_visible: false }); - Notify.success("发送成功"); + this.setState({ audit_visible: false }) + Notify.success('发送成功') }, (err) => { - Notify.error(err); + Notify.error(err) } - ); - }); + ) + }) } componentDidMount(e) { let data = { page: 1, - limit: 10, - }; - this.getPlanList(data); + limit: 10 + } + this.getPlanList(data) } componentWillMount() { - this.setState({ tableHeight: window.innerHeight - 430 }); + this.setState({ tableHeight: window.innerHeight - 430 }) } getPlanList(data) { let queryParams = _.omitBy(data, (value) => { - return _.isNaN(value) || _.isNil(value); - }); + return _.isNaN(value) || _.isNil(value) + }) getPlanList(queryParams).then((res) => { handelResponse( res, (req, msg) => { - this.setState({ distdata: req.data }); - this.setState({ dataCount: req.total }); + this.setState({ distdata: req.data }) + this.setState({ dataCount: req.total }) }, (err) => {} - ); - }); + ) + }) } onCountChange(e) { this.setState({ page: 1, - limit: e, - }); + limit: e + }) setTimeout(() => { - this.getpageFn(); - }, 200); + this.getpageFn() + }, 200) } getpageFn() { let data = { page: this.state.page, limit: this.state.limit, status: this.state.status, - key_word: this.state.key_word, - }; - if (data.key_word === "") { - delete data.key_word; + key_word: this.state.key_word } - this.getPlanList(data); + if (data.key_word === '') { + delete data.key_word + } + this.getPlanList(data) } //切换siwtch onSwitchChange(status, row) { - let self = this; + let self = this Sweetalert.confirm({ - type: "warning", + type: 'warning', closeBtn: true, - title: "确认操作", + title: '确认操作', content: (

- 是否改变{row.open == 1 ? "关闭" : "开启"} + 是否改变{row.open == 1 ? '关闭' : '开启'} [{row.title}]的状态?

), onConfirm: () => { - this.changeState(status, row); + this.changeState(status, row) }, onCancel: this.onCancel, - className: "questModal", - parentComponent: this, - }); + className: 'questModal', + parentComponent: this + }) } cancel(e) { - this.setState({ audit_visible: false }); + this.setState({ audit_visible: false }) } //修改状态 changeState(status, row) { - let self = this; + let self = this let data = { - operation: status ? 1 : 2, - }; + operation: status ? 1 : 2 + } if (row.status == 3) { - this.setState({ plan_id: row.id }); + this.setState({ plan_id: row.id }) planIsSend(row.id).then((res) => { handelResponse(res, (req, msg) => { if (req.is_send == false) { - this.setState({ cur_item: row }); + this.setState({ cur_item: row }) getReseller(row.reseller_id).then((res) => { handelResponse( res, (req, msg) => { - this.setState({ phone_list: req.contact_phone }); - this.setState({ email_list: req.contact_email }); - this.setState({ isSend: false }); - this.setState({ audit_visible: true }); + this.setState({ phone_list: req.contact_phone }) + this.setState({ email_list: req.contact_email }) + this.setState({ isSend: false }) + this.setState({ audit_visible: true }) }, (err) => { - Notify.error(err); + Notify.error(err) } - ); - }); + ) + }) } else { startOrStopPlan(row.id, data).then((res) => { handelResponse( res, (req, msg) => { let id = _.findIndex(this.state.distdata, (o) => { - return o.id == row.id; - }); - this.state.distdata[id].open = status ? 2 : 1; - this.setState({ distdata: this.state.distdata }); + return o.id == row.id + }) + this.state.distdata[id].open = status ? 2 : 1 + this.setState({ distdata: this.state.distdata }) let data = { page: this.state.page, limit: this.state.limit, status: this.state.status, - key_word: this.state.key_word, - }; - self.getPlanList(data); - Notify.success("更改状态成功"); + key_word: this.state.key_word + } + self.getPlanList(data) + Notify.success('更改状态成功') }, (err) => { - Notify.error(err); + Notify.error(err) } - ); - }); + ) + }) } - }); - }); + }) + }) } else { startOrStopPlan(row.id, data).then((res) => { handelResponse( res, (req, msg) => { let id = _.findIndex(this.state.distdata, (o) => { - return o.id == row.id; - }); - this.state.distdata[id].open = status ? 2 : 1; - this.setState({ distdata: this.state.distdata }); + return o.id == row.id + }) + this.state.distdata[id].open = status ? 2 : 1 + this.setState({ distdata: this.state.distdata }) let data = { page: this.state.page, limit: this.state.limit, status: this.state.status, - key_word: this.state.key_word, - }; - self.getPlanList(data); - Notify.success("更改状态成功"); + key_word: this.state.key_word + } + self.getPlanList(data) + Notify.success('更改状态成功') }, (err) => { - Notify.error(err); + Notify.error(err) } - ); - }); + ) + }) } } //输入值变化 onInputChange(e) {} //营销系统名称 linkTo(row) { - sessionStorage.setItem("showflag", true); + sessionStorage.setItem('showflag', true) let arr = [ { - pagetitle: "编辑", + pagetitle: '编辑', items: [ - { path: "/home/key-list", name: "营销计划管理" }, - { path: "/home/key-list", name: row.title + "key列表" }, - ], - }, - ]; - sessionStorage.setItem("plan_item", JSON.stringify(row)); - sessionStorage.setItem("knockGold_effectDate", JSON.stringify(row)); - sessionStorage.setItem("breaknav", JSON.stringify(arr)); - sessionStorage.setItem("linkshowname", "营销计划管理"); - sessionStorage.setItem("key_plan_id", row.id); - sessionStorage.setItem("key_plan_status", row.status); + { path: '/home/key-list', name: '营销计划管理' }, + { path: '/home/key-list', name: row.title + 'key列表' } + ] + } + ] + sessionStorage.setItem('plan_item', JSON.stringify(row)) + sessionStorage.setItem('knockGold_effectDate', JSON.stringify(row)) + sessionStorage.setItem('breaknav', JSON.stringify(arr)) + sessionStorage.setItem('linkshowname', '营销计划管理') + sessionStorage.setItem('key_plan_id', row.id) + sessionStorage.setItem('key_plan_status', row.status) // this.props.history.push('/home/key-list'); - window.open("#/home/key-list"); + window.open('#/home/key-list') } menuItemClick(e, key, row) { - this.setState({ plan_id: row.id }); + this.setState({ plan_id: row.id }) if (row.status == 6) { - Notify.clear(); - Notify.error("该状态下的数据不允许编辑"); - return; + Notify.clear() + Notify.error('该状态下的数据不允许编辑') + return } if (key == 1) { @@ -333,114 +333,114 @@ export default class acclist extends React.Component { handelResponse( res, (req, msg) => { - this.setState({ phone_list: req.contact_phone }); - this.setState({ email_list: req.contact_email }); - this.setState({ audit_visible: true }); + this.setState({ phone_list: req.contact_phone }) + this.setState({ email_list: req.contact_email }) + this.setState({ audit_visible: true }) }, (err) => { - Notify.error(err); + Notify.error(err) } - ); - }); + ) + }) } if (key == 3) { - let self = this; + let self = this Sweetalert.confirm({ - type: "warning", + type: 'warning', closeBtn: true, - title: "确认操作", + title: '确认操作', content:

是否确定作废[{row.title}]?

, onConfirm: () => { - self.setState({ isCancel: true }); + self.setState({ isCancel: true }) planCancel(row.id).then((res) => { - self.setState({ isCancel: false }); + self.setState({ isCancel: false }) handelResponse( res, (req, msg) => { - Notify.success("作废成功"); - self.setState({ page: 1 }); - self.setState({ limit: 10 }); + Notify.success('作废成功') + self.setState({ page: 1 }) + self.setState({ limit: 10 }) let data = { page: 1, - limit: 10, - }; - self.getPlanList(data); + limit: 10 + } + self.getPlanList(data) }, (err) => { - Notify.error(err); + Notify.error(err) } - ); - }); + ) + }) }, onCancel: this.onCancel, - className: "questModal", - parentComponent: this, - }); + className: 'questModal', + parentComponent: this + }) } //删除 if (key == 4) { - let self = this; + let self = this Sweetalert.confirm({ - type: "warning", + type: 'warning', closeBtn: true, - title: "确认操作", + title: '确认操作', content:

是否确定删除[{row.title}]?

, onConfirm: () => { deldraftCode(row.id).then((res) => { handelResponse( res, (req, msg) => { - Notify.success(msg); - self.setState({ page: 1 }); - self.setState({ limit: 10 }); + Notify.success(msg) + self.setState({ page: 1 }) + self.setState({ limit: 10 }) let data = { page: 1, limit: 10, status: this.state.status, - key_word: this.state.key_word, - }; - if (data.key_word === "") { - delete data.key_word; + key_word: this.state.key_word } - self.getPlanList(data); + if (data.key_word === '') { + delete data.key_word + } + self.getPlanList(data) }, (err) => { - Notify.error(err); + Notify.error(err) } - ); - }); + ) + }) }, onCancel: this.onCancel, - className: "questModal", - parentComponent: this, - }); + className: 'questModal', + parentComponent: this + }) } } //清空 clearFn() { - this.refs.plan_list.allChecked(false); - this.setState({ selectiondata: [] }); + this.refs.plan_list.allChecked(false) + this.setState({ selectiondata: [] }) } //选中表格的选框 selection(selection) { - this.setState({ selectiondata: selection }); - let grantTotal = 0; - let receiveTotal = 0; - let usageTotal = 0; - let silentTotal = 0; - let receive_total = 0; - let usage_total = 0; - let silent_total = 0; + this.setState({ selectiondata: selection }) + let grantTotal = 0 + let receiveTotal = 0 + let usageTotal = 0 + let silentTotal = 0 + let receive_total = 0 + let usage_total = 0 + let silent_total = 0 selection.forEach((item) => { - grantTotal += Number(item.grant); - receiveTotal += Number(item.receive); - usageTotal += Number(item.usage); - silentTotal += Number(item.silent); - receive_total += Number(item.receive_total); - usage_total += Number(item.usage_total); - silent_total += Number(item.silent_total); - }); + grantTotal += Number(item.grant) + receiveTotal += Number(item.receive) + usageTotal += Number(item.usage) + silentTotal += Number(item.silent) + receive_total += Number(item.receive_total) + usage_total += Number(item.usage_total) + silent_total += Number(item.silent_total) + }) this.setState({ grantTotal, receiveTotal, @@ -448,33 +448,33 @@ export default class acclist extends React.Component { silentTotal, receive_total, usage_total, - silent_total, - }); + silent_total + }) } onFilter(e, prop) { - this.setState({ page: 1 }); - this.setState({ limit: 10 }); + this.setState({ page: 1 }) + this.setState({ limit: 10 }) let data = { page: 1, limit: 10, - key_word: this.state.key_word, - }; - data[prop] = e; - if (e == 999) { - delete data[prop]; - } else { - let params = {}; - params[prop] = e; - this.setState(params); + key_word: this.state.key_word } - this.getPlanList(data); + data[prop] = e + if (e == 999) { + delete data[prop] + } else { + let params = {} + params[prop] = e + this.setState(params) + } + this.getPlanList(data) } phoneChange = (e) => { - this.setState({ phone: e.target.value }); - }; + this.setState({ phone: e.target.value }) + } emailChange = (e) => { - this.setState({ email: e.target.value }); - }; + this.setState({ email: e.target.value }) + } // 监听组件内部状态的变化: componentDidUpdate(prevProps, prevState) { @@ -484,201 +484,201 @@ export default class acclist extends React.Component { prevState.key_word != this.state.key_word && prevState.status != this.state.status ) { - this.iptsureFn(); + this.iptsureFn() } } iptsureFn(e) { - this.setState({ page: 1 }); - this.setState({ limit: 10 }); + this.setState({ page: 1 }) + this.setState({ limit: 10 }) let data = { page: 1, limit: 10, status: this.state.status, - key_word: this.state.key_word, - }; - this.getPlanList(data); + key_word: this.state.key_word + } + this.getPlanList(data) } onPhoneChange(e) { - this.setState({ phone_radio: e.target.value }); + this.setState({ phone_radio: e.target.value }) } onEmailChange(e) { - this.setState({ email_radio: e.target.value }); + this.setState({ email_radio: e.target.value }) } onEdit(e, row) { - sessionStorage.setItem("showflag", true); + sessionStorage.setItem('showflag', true) let editarr = [ { - pagetitle: "编辑", + pagetitle: '编辑', items: [ - { path: "/home/key-list", name: "营销计划管理" }, - { path: "/home/key-list", name: "编辑:" + row.title }, - ], - }, - ]; - sessionStorage.setItem("breakchangenav", JSON.stringify(editarr)); + { path: '/home/key-list', name: '营销计划管理' }, + { path: '/home/key-list', name: '编辑:' + row.title } + ] + } + ] + sessionStorage.setItem('breakchangenav', JSON.stringify(editarr)) if (row.status == 6) { - Notify.clear(); - Notify.error("不可编辑"); - return; + Notify.clear() + Notify.error('不可编辑') + return } - sessionStorage.setItem("plan_id", row.id); - sessionStorage.setItem("plan_status", row.status); - sessionStorage.setItem("approval_id", row.approval_id); + sessionStorage.setItem('plan_id', row.id) + sessionStorage.setItem('plan_status', row.status) + sessionStorage.setItem('approval_id', row.approval_id) let link = window.location.href.replace( window.location.hash, - "#/home/plan-edit" - ); - window.open(link, "_blank"); + '#/home/plan-edit' + ) + window.open(link, '_blank') - sessionStorage.setItem("showflag", true); + sessionStorage.setItem('showflag', true) let arr = [ { - pagetitle: "编辑", + pagetitle: '编辑', items: [ - { path: "/home/key-list", name: "营销计划管理" }, - { path: "/home/key-list", name: "编辑:" + row.title }, - ], - }, - ]; - sessionStorage.setItem("breaknav", JSON.stringify(arr)); - sessionStorage.setItem("linkshowname", "营销计划管理"); + { path: '/home/key-list', name: '营销计划管理' }, + { path: '/home/key-list', name: '编辑:' + row.title } + ] + } + ] + sessionStorage.setItem('breaknav', JSON.stringify(arr)) + sessionStorage.setItem('linkshowname', '营销计划管理') } // 一键复制 onCopy(e, data) { - console.log("data =>", data); + console.log('data =>', data) if (data.status === 0) { - return; + return } let link = window.location.href.replace( window.location.hash, - "#/home/plan-copy" - ); - window.open(link, "_blank"); + '#/home/plan-copy' + ) + window.open(link, '_blank') } onFilterClose(prop) { - let data = {}; - data[prop] = null; - this.setState(data); - this.setState({ page: 1 }); - this.setState({ limit: 10 }); + let data = {} + data[prop] = null + this.setState(data) + this.setState({ page: 1 }) + this.setState({ limit: 10 }) let params = { page: 1, limit: 10, - key_word: this.state.key_word, - }; - this.getPlanList(params); + key_word: this.state.key_word + } + this.getPlanList(params) } render() { - const { current, pageSize } = this.state; + const { current, pageSize } = this.state const Column = [ { - title: "营销计划名称", - name: "title", - prop: "title", - type: "slot", - width: "auto", + title: '营销计划名称', + name: 'title', + prop: 'title', + type: 'slot', + width: 'auto' }, { - title: "启用", - width: "auto", - type: "slot", - prop: "switch", + title: '启用', + width: 'auto', + type: 'slot', + prop: 'switch' }, { - title: "分销商", - prop: "reseller_name", - name: "reseller_name", - width: "auto", - type: "normal", + title: '分销商', + prop: 'reseller_name', + name: 'reseller_name', + width: 'auto', + type: 'normal' }, { - title: "状态", - name: "status", - prop: "status", - type: "slot", - width: "auto", + title: '状态', + name: 'status', + prop: 'status', + type: 'slot', + width: 'auto' }, { - title: "创建人", - name: "creator_name", - prop: "creator_name", - type: "normal", - width: "auto", + title: '创建人', + name: 'creator_name', + prop: 'creator_name', + type: 'normal', + width: 'auto' }, { - title: "时间范围", - type: "slot", - prop: "dates", - width: "260px", + title: '时间范围', + type: 'slot', + prop: 'dates', + width: '260px' }, { - title: "操作", - prop: "opearo", - name: "opearo", - type: "slot", - width: "auto", + title: '操作', + prop: 'opearo', + name: 'opearo', + type: 'slot', + width: '120px' }, { - title: "发放key码总数", - name: "grant", - type: "normal", - prop: "grant", - width: "auto", + title: '发放key码总数', + name: 'grant', + type: 'normal', + prop: 'grant', + width: 'auto' }, { - title: "领取key总数", - name: "receive", - type: "normal", - prop: "receive", - width: "auto", + title: '领取key总数', + name: 'receive', + type: 'normal', + prop: 'receive', + width: 'auto' }, { - title: "使用key码总数", - name: "usage", - type: "normal", - prop: "usage", - width: "auto", + title: '使用key码总数', + name: 'usage', + type: 'normal', + prop: 'usage', + width: 'auto' }, { - title: "失效key码总数", - name: "overdue", - type: "normal", - prop: "overdue", - width: "auto", + title: '失效key码总数', + name: 'overdue', + type: 'normal', + prop: 'overdue', + width: 'auto' }, { - title: "作废key码总数", - name: "invalid", - type: "normal", - prop: "invalid", - width: "auto", + title: '作废key码总数', + name: 'invalid', + type: 'normal', + prop: 'invalid', + width: 'auto' }, { - title: "可用key码总数", - name: "silent", - type: "normal", - prop: "silent", - width: "auto", + title: '可用key码总数', + name: 'silent', + type: 'normal', + prop: 'silent', + width: 'auto' }, { - title: "完结key码总数", - name: "end", - type: "normal", - prop: "end", - width: "auto", + title: '完结key码总数', + name: 'end', + type: 'normal', + prop: 'end', + width: 'auto' }, { - title: "更新时间", - name: "update_time", - type: "normal", - prop: "update_time", - width: "140px", - }, + title: '更新时间', + name: 'update_time', + type: 'normal', + prop: 'update_time', + width: '140px' + } // { // title: "发放总价(预估)", // name: "grant_total", @@ -719,16 +719,15 @@ export default class acclist extends React.Component { // width: "auto", // valueType: "price", // }, - ]; + ] return ( -
+
-
+
{/* */} @@ -736,44 +735,42 @@ export default class acclist extends React.Component { onChange={(e) => this.setState({ key_word: e })} value={this.state.key_word} wordSearch={this.iptsureFn.bind(this)} - icon="search" - placeholder={"请输入营销计划名称、分销商名称查询"} + icon='search' + placeholder={'请输入营销计划名称、分销商名称查询'} countShow={false} - height={"36px"} - width={"260px"} + height={'36px'} + width={'260px'} onClearItem={(e) => { - this.setState({ key_word: "" }); + this.setState({ key_word: '' }) let data = { page: 1, - limit: 10, - }; - this.getPlanList(data); + limit: 10 + } + this.getPlanList(data) }} - alignment={"left"} + alignment={'left'} />
{ - this.onFilter(e, prop); + this.onFilter(e, prop) }} onClose={(e) => { - this.onFilterClose(e); - }} - > + this.onFilterClose(e) + }}>
{this.state.selectiondata.length > 0 ? ( + - } - > + }> 已选择 - + {this.state.selectiondata.length} 发放key总数:{this.state.grantTotal},领取key总数: @@ -785,119 +782,113 @@ export default class acclist extends React.Component { ) : null} { - this.onPageChange(e); + this.onPageChange(e) }} countChange={(e) => { - this.onCountChange(e); + this.onCountChange(e) }} checkChange={this.selection.bind(this)} ComponentHandler={(com, rowData) => { - if (com == "dates") { + if (com == 'dates') { return ( {rowData.begin_time} 至 {rowData.end_time} - ); + ) } - if (com == "title") { + if (com == 'title') { return ( { - this.linkTo(rowData); - }} - > + this.linkTo(rowData) + }}> {rowData.title} - ); + ) } - if (com == "switch") { + if (com == 'switch') { return ( { - this.onSwitchChange(e, rowData); - }} - > - ); + this.onSwitchChange(e, rowData) + }}> + ) } - if (com == "status") { + if (com == 'status') { return ( -

+

+ ) + }}> {rowData.status_text}

- ); + ) } - if (com == "opearo") { + if (com == 'opearo') { let str = ( { - this.onEdit(e, rowData); - }} - > + this.onEdit(e, rowData) + }}> 编辑 { - this.onCopy(e, rowData); - }} - > + this.onCopy(e, rowData) + }}> 复制 -
{}}> - {" "} - 更多 {" "} +
{}}> + {' '} + 更多 {' '}
this.menuItemClick(e, key, rowData) - } - > - 发送密码及压缩包 - + }> + 发送密码及压缩包 + 日志 - + 作废 - ); + ) // if(rowData.status ==6 ||rowData.status == 0 ) // { @@ -921,103 +912,97 @@ export default class acclist extends React.Component { if (rowData.status == 0) { str = (
- {" "} + {' '} { - this.onEdit(e, rowData); - }} - > + this.onEdit(e, rowData) + }}> 编辑 { - this.onCopy(e, rowData); - }} - > + this.onCopy(e, rowData) + }}> 复制
{}} - > - {" "} - 更多 {" "} + className='linkmore' + style={{ paddingLeft: '2px' }} + onClick={(e) => {}}> + {' '} + 更多 {' '}
this.menuItemClick(e, key, rowData) - } - > - 删除 + }> + 删除
- ); + ) } if (rowData.status == 6) { str = (
- {" "} - + {' '} + 编辑
{}} - > - {" "} - 更多 {" "} + className='linkmore' + style={{ paddingLeft: '2px', color: '#d8dbdd' }} + onClick={(e) => {}}> + {' '} + 更多 {' '}
- ); + ) } - return str; + return str } }} /> {this.state.audit_visible ? (
-
-
+
+
{ - this.cancel(e); + this.cancel(e) }} /> -
发送
-
+
发送
+
是否立即发送key以及解压密码?
-
+
接收手机号
-
+
{ - this.onPhoneChange(e); - }} - > + this.onPhoneChange(e) + }}> {this.state.phone_list.map((item, index) => { return ( + }}> {item} - ); + ) })}
-
+
接收邮箱
-
+
{ - this.onEmailChange(e); - }} - > + this.onEmailChange(e) + }}> {this.state.email_list.map((item, index) => { return ( + }}> {item} - ); + ) })}
-
+
-1} - > + disabled={this.state.phone_radio > -1}>
-
+
-1} - > + disabled={this.state.email_radio > -1}>
-
+
@@ -1106,6 +1084,6 @@ export default class acclist extends React.Component {
- ); + ) } }