This commit is contained in:
zhangds 2022-08-08 13:44:29 +08:00
commit 459a484e9b
15 changed files with 5729 additions and 16 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,268 @@
.addkey-btn-group{
margin-left: 10px;
margin-top: 15px;
button{
width: 100px;
height: 36px;
}
}
.btn-add{
width: 50%;
margin: 0 auto;
height: 36px;
margin-top: 20px;
text-align: center;
line-height: 36px;
background-color: rgb(249, 250, 252);
}
#addkey .zent-radio-button--disabled[data-zv="9.11.0"].zent-radio-button--checked{
color: #8a96aa;
background: #dfe8fc!important;
border: 1px solid #8a96aa!important;
}
.import-excel
{
width: 451px;
height:600px;
background-color: #FFFFFF;
border-radius: 5px;
position: fixed;
top: 50%;
margin-top: -280px;
left: 50%;
margin-left: -215px;
z-index: 100;
.import-header{
width: 100%;
height: 48px;
display: flex;
align-items: center;
.import-title{
width: 70%;
font-size: 18px;
font-weight: bold;
margin-left: 20px;
}
.closebtn{
width: 30%;
}
.import-close{
margin-left: 70px;
font-size: 20px;
font-weight: bold;
}
}
.step-bar{
width: 80%;
height: 60px;
margin: 10px auto;
display: flex;
justify-content: center;
}
.step-code{
width: 24px;
height: 24px;
border-radius: 50%;
border: 1px solid #e8e8e8;
display: flex;
align-items: center;
justify-content: center;
color: #e8e8e8;
}
.step-code.active
{
background-color: #1890ff;
}
.step-group{
width: 150px;
height: 50px;
display: flex;
align-items: center;
}
.step-center{
width: 60px;
height: 50px;
display: flex;
align-items: center;
margin-right: 40px;
}
.step-line{
width: 50px;
height: 1px;
background-color:#e8e8e8;
}
.step-line.active{
background-color: #1890ff;
}
.step-label{
color: #8d8d8d;
font-size: 14px;
margin-left: 10px;
font-weight: bold;
}
.step-label.active{
color: #000000;
}
.upload-panel1{
width: 80%;
margin: 10px auto;
margin-bottom: 20px;
.upload-label{
font-size: 15px;
font-weight: bold;
margin-bottom: 20px;
}
.upload-info{
color:#626366;
}
}
.btn-upload{
margin-top: 10px;
margin-left: 40px;
margin-bottom: 20px;
background-color:#1890ff;
}
.btn-download{
margin-top: 10px;
margin-left: 40px;
}
.foot-bar
{
width: 100%;
height: 50px;
position: absolute;
bottom: 20px;
.btn-group{
width: 240px;
margin-left: 160px;
}
button{
width: 100px;
}
}
.upload-msgbar{
width: 82%;
background-color: #f5f5f5;
margin: 0 auto;
min-height: 40px;
border-radius: 5px;
display: flex;
.execel-name{
width: 75%;
display: flex;
min-height: 40px;
align-items: center;
.excel-txt{
font-size: 12px;
margin-left: 10px;
}
.doc-flag{
font-size: 20px;
margin-left: 5px;
}
}
.file-tag{
width: 25%;
font-size: 12px;
display: flex;
align-items: center;
color: #1890ff;
.upload-flag{
font-size: 20px;
margin-left: 5px;
color: #1890ff;
margin-right: 3px;
}
}
}
.file-tip{
margin-left: 45px;
margin-top: 10px;
margin-bottom: 50px;
}
.error{
color: #e83f2e;
}
.success{
color: #98d673;
}
.error-icon{
color: #e83f2e;
font-size: 18px;
margin-right: 10px;
}
.success-icon{
color: #98d673;
font-size: 18px;
margin-right: 10px;
}
.file-upload-tip{
color: #000000;
font-size: 14px;
font-weight: bold;
margin-left: 40px;
margin-top: 20px;
}
.file-errmsg{
color: #000000;
font-size: 14px;
margin-left: 40px;
margin-top: 40px;
}
.gridpanel{
width: 90%;
height: 400px;
margin: 0 auto;
margin-top: 50px;
}
}
.audit-obj{
margin-left: 30px;
margin-bottom: 10px;
}
.upload-input{
opacity: 0;
width: 300px;
height: 48px;
position: absolute;
z-index: 5;
}
.file-loading{
font-size: 24px;
}
.isImport{
cursor: "pointer";
}
.goods-boxs{
display: flex;
justify-content: flex-start;
}

View File

@ -245,7 +245,13 @@ export default class acclist extends React.Component {
return obj return obj
}) })
let pr = {} let pr = {}
pr.range = item.range let productRange = []
item.product.forEach(item=>{
productRange.push(item.product_name);
});
productRange = productRange.toString()
console.log(255,productRange);
pr.range = productRange
pr.restrict = item.restrict pr.restrict = item.restrict
pr.title = item.title pr.title = item.title
pr.begin_time = item.begin_time pr.begin_time = item.begin_time
@ -1034,7 +1040,6 @@ export default class acclist extends React.Component {
let success = req.count - req.errorCount let success = req.count - req.errorCount
this.setState({ success_count: success }) this.setState({ success_count: success })
this.setState({ exceldata: req.validationFailed }) this.setState({ exceldata: req.validationFailed })
this.setState({ success_visible: true }) this.setState({ success_visible: true })
}, },
(err) => { (err) => {
@ -1576,6 +1581,7 @@ export default class acclist extends React.Component {
width={'520px'} width={'520px'}
alignment={'left'} alignment={'left'}
/> />
</FormItem> </FormItem>
<FormItem labelname='发放总量' prop='issued' id='issued'> <FormItem labelname='发放总量' prop='issued' id='issued'>
<Ipt <Ipt

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,268 @@
.addkey-btn-group{
margin-left: 10px;
margin-top: 15px;
button{
width: 100px;
height: 36px;
}
}
.btn-add{
width: 50%;
margin: 0 auto;
height: 36px;
margin-top: 20px;
text-align: center;
line-height: 36px;
background-color: rgb(249, 250, 252);
}
#addkey .zent-radio-button--disabled[data-zv="9.11.0"].zent-radio-button--checked{
color: #8a96aa;
background: #dfe8fc!important;
border: 1px solid #8a96aa!important;
}
.import-excel
{
width: 451px;
height:600px;
background-color: #FFFFFF;
border-radius: 5px;
position: fixed;
top: 50%;
margin-top: -280px;
left: 50%;
margin-left: -215px;
z-index: 100;
.import-header{
width: 100%;
height: 48px;
display: flex;
align-items: center;
.import-title{
width: 70%;
font-size: 18px;
font-weight: bold;
margin-left: 20px;
}
.closebtn{
width: 30%;
}
.import-close{
margin-left: 70px;
font-size: 20px;
font-weight: bold;
}
}
.step-bar{
width: 80%;
height: 60px;
margin: 10px auto;
display: flex;
justify-content: center;
}
.step-code{
width: 24px;
height: 24px;
border-radius: 50%;
border: 1px solid #e8e8e8;
display: flex;
align-items: center;
justify-content: center;
color: #e8e8e8;
}
.step-code.active
{
background-color: #1890ff;
}
.step-group{
width: 150px;
height: 50px;
display: flex;
align-items: center;
}
.step-center{
width: 60px;
height: 50px;
display: flex;
align-items: center;
margin-right: 40px;
}
.step-line{
width: 50px;
height: 1px;
background-color:#e8e8e8;
}
.step-line.active{
background-color: #1890ff;
}
.step-label{
color: #8d8d8d;
font-size: 14px;
margin-left: 10px;
font-weight: bold;
}
.step-label.active{
color: #000000;
}
.upload-panel1{
width: 80%;
margin: 10px auto;
margin-bottom: 20px;
.upload-label{
font-size: 15px;
font-weight: bold;
margin-bottom: 20px;
}
.upload-info{
color:#626366;
}
}
.btn-upload{
margin-top: 10px;
margin-left: 40px;
margin-bottom: 20px;
background-color:#1890ff;
}
.btn-download{
margin-top: 10px;
margin-left: 40px;
}
.foot-bar
{
width: 100%;
height: 50px;
position: absolute;
bottom: 20px;
.btn-group{
width: 240px;
margin-left: 160px;
}
button{
width: 100px;
}
}
.upload-msgbar{
width: 82%;
background-color: #f5f5f5;
margin: 0 auto;
min-height: 40px;
border-radius: 5px;
display: flex;
.execel-name{
width: 75%;
display: flex;
min-height: 40px;
align-items: center;
.excel-txt{
font-size: 12px;
margin-left: 10px;
}
.doc-flag{
font-size: 20px;
margin-left: 5px;
}
}
.file-tag{
width: 25%;
font-size: 12px;
display: flex;
align-items: center;
color: #1890ff;
.upload-flag{
font-size: 20px;
margin-left: 5px;
color: #1890ff;
margin-right: 3px;
}
}
}
.file-tip{
margin-left: 45px;
margin-top: 10px;
margin-bottom: 50px;
}
.error{
color: #e83f2e;
}
.success{
color: #98d673;
}
.error-icon{
color: #e83f2e;
font-size: 18px;
margin-right: 10px;
}
.success-icon{
color: #98d673;
font-size: 18px;
margin-right: 10px;
}
.file-upload-tip{
color: #000000;
font-size: 14px;
font-weight: bold;
margin-left: 40px;
margin-top: 20px;
}
.file-errmsg{
color: #000000;
font-size: 14px;
margin-left: 40px;
margin-top: 40px;
}
.gridpanel{
width: 90%;
height: 400px;
margin: 0 auto;
margin-top: 50px;
}
}
.audit-obj{
margin-left: 30px;
margin-bottom: 10px;
}
.upload-input{
opacity: 0;
width: 300px;
height: 48px;
position: absolute;
z-index: 5;
}
.file-loading{
font-size: 24px;
}
.isImport{
cursor: "pointer";
}
.goods-boxs{
display: flex;
justify-content: flex-start;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
.addkey-btn-group {
margin-left: 15px;
margin-top: 15px;
margin-bottom: 40px;
button {
width: 100px;
height: 36px;
}
}
.btn-add {
width: 50%;
margin: 0 auto;
height: 36px;
margin-top: 20px;
text-align: center;
line-height: 36px;
background-color: rgb(249, 250, 252);
}
#addkey .zent-radio-button--disabled[data-zv="9.11.0"].zent-radio-button--checked {
color: #8a96aa;
background: #dfe8fc !important;
border: 1px solid #8a96aa !important;
}
.line-value {
width: 40%;
text-align: left;
height: 36px;
border-bottom: 1px solid #e0e0e0;
}
.goods-boxs {
display: flex;
justify-content: flex-start;
}

View File

@ -0,0 +1,158 @@
/*
* @Author: Wind
* @Date: 2022-08-04 17:53:11
* @LastEditors: Wind
* @LastEditTime: 2022-08-04 18:02:04
* @Description:
* @FilePath: \frontend\src\pages\exchangecode\copyCode\utils.js
*/
export const Column2 = [
{
title: '商品ID',
name: 'product_id',
prop: 'product_id',
width: 'auto',
type: 'normal'
},
{
title: '立减金平台批次号',
width: '250px',
prop: 'channel_activity_id',
name: 'channel_activity_id',
type: 'normal'
},
{
title: '类型',
width: 'auto',
prop: 'type',
name: 'type',
type: 'slot'
},
{
title: '上游平台',
width: 'auto',
prop: 'upstream',
name: 'upstream',
type: 'normal'
},
{
title: '有效时间段',
width: '575px',
prop: 'effectDate',
name: 'effectDate',
type: 'normal'
},
{
title: '商品名称',
width: 'auto',
prop: 'product_name',
name: 'product_name',
type: 'normal'
},
{
title: '当前成本价格',
prop: 'cost_price',
name: 'cost_price',
width: '250px',
type: 'slot'
},
{
title: '合同价',
name: 'contract_price',
prop: 'contract_price',
type: 'normal',
width: 'auto'
},
{
title: '商品官方价',
type: 'normal',
prop: 'official_price',
width: 'auto'
},
{
title: '库存数量',
prop: 'quantity',
name: 'quantity',
type: 'normal',
width: 'auto'
},
{
title: '操作',
prop: 'edit',
name: 'edit',
type: 'slot',
width: 'auto'
}
]
export const Column = [
{
title: '兑换名称',
name: 'title',
prop: 'title',
type: 'normal',
width: 'auto'
},
{
title: '兑换码范围',
type: 'normal',
prop: 'range',
width: 'auto'
},
{
title: '有效开始日期',
prop: 'begin_time',
name: 'begin_time',
width: 'auto',
type: 'normal'
},
{
title: '有效结束日期',
name: 'end_time',
prop: 'end_time',
type: 'normal',
width: 'auto'
},
{
title: '兑换码数量',
name: 'quantity',
type: 'normal',
prop: 'quantity',
defaultText: 'PM',
width: 'auto'
},
{
title: '绑定数',
prop: 'restrict',
name: 'restrict',
type: 'slot',
width: 'auto'
},
{
title: '操作',
prop: 'edit',
name: 'edit',
type: 'slot',
width: 'auto'
}
]
//基本规则
export const rulesInfo = {
date_time: [{ type: 'required', message: '请选择生效时间段' }],
rank: [{ type: 'required', message: '请选择商品范围' }]
}
//基本信息
export const codeInfo = {
code_name: [{ type: 'required', message: '请输入兑换码名称' }],
issued: [
{ type: 'required', message: '请输入发放总量' },
{
type: 'regExp',
message: '请输入正整数',
reg: '^([1-9][0-9]*){1,3}$'
}
]
}

View File

@ -186,19 +186,21 @@ export default class acclist extends React.Component {
} }
/* 处理可复制数据逻辑 */ /* 处理可复制数据逻辑 */
copyElementFunction({ key_batch_id, status, end_time, keyBatch }) { copyElementFunction({ key_batch_id, status, end_time, keyBatch, id }) {
const today = moment().format('yyyy-MM-DD HH:mm:ss') const today = moment().format('yyyy-MM-DD HH:mm:ss')
let element = '' let element = ''
if ( if (
![-1, 6, 7].includes(status) && ![-1, 6, 7].includes(status) &&
![6, 7].includes(keyBatch.status) &&
end_time > today && end_time > today &&
!keyBatch.approval_status &&
keyBatch.discard === 0 keyBatch.discard === 0
) { ) {
element = ( element = (
<span <span
className='grid-link' className='grid-link'
style={{ marginLeft: '10px' }} style={{ marginLeft: '10px' }}
onClick={(e) => this.copyFunction(key_batch_id)}> onClick={(e) => this.copyFunction(key_batch_id, id, keyBatch)}>
复制 复制
</span> </span>
) )
@ -245,9 +247,11 @@ export default class acclist extends React.Component {
} }
/* 复制 */ /* 复制 */
copyFunction(id) { copyFunction(key_batch_id, id, keyBatch) {
sessionStorage.setItem('copyOpearo', 2) sessionStorage.setItem('keybatch_id', key_batch_id)
sessionStorage.setItem('keybatch_id', id) sessionStorage.setItem('copy_code_id', id)
sessionStorage.setItem('key_reseller_id', keyBatch.plan.reseller_id)
sessionStorage.setItem('approval_id', keyBatch.approval_id) /* 审核id */
let breakchangenav = [ let breakchangenav = [
{ {
pagetitle: '复制key', pagetitle: '复制key',
@ -257,15 +261,15 @@ export default class acclist extends React.Component {
name: '兑换码管理' name: '兑换码管理'
}, },
{ {
path: '/home/exchangecode-add', path: '/home/exchangecode-copyCode',
name: '复制key' name: '复制key'
} }
] ]
} }
] ]
sessionStorage.setItem('pathname2', '/home/exchangecode-add') sessionStorage.setItem('pathname2', '/home/exchangecode-copyCode')
sessionStorage.setItem('breakchangenav', JSON.stringify(breakchangenav)) sessionStorage.setItem('breakchangenav', JSON.stringify(breakchangenav))
this.props.history.push('/home/exchangecode-add') this.props.history.push('/home/exchangecode-copyCode')
} }
tabFn(index) { tabFn(index) {

View File

@ -558,7 +558,7 @@ export default class adduserinfo extends React.Component {
value={this.state.model.product_name} value={this.state.model.product_name}
placeholder={'请输入'} placeholder={'请输入'}
labelWidth={'0px'} labelWidth={'0px'}
maxLength={16} maxLength={20}
height={'36px'} height={'36px'}
width={'520px'} width={'520px'}
alignment={'left'} alignment={'left'}

View File

@ -610,7 +610,7 @@ export default class adduserinfo extends React.Component {
value={this.state.model.product_name} value={this.state.model.product_name}
placeholder={'请输入'} placeholder={'请输入'}
labelWidth={'0px'} labelWidth={'0px'}
maxLength={16} maxLength={20}
height={'36px'} height={'36px'}
width={'520px'} width={'520px'}
alignment={'left'} alignment={'left'}

View File

@ -57,6 +57,7 @@ import distributorEdit from "../distributor/add/add";
import mytempMouldadd from "../exchangepage/template/main.js"; import mytempMouldadd from "../exchangepage/template/main.js";
// import edittemplate from '../exchangepage/edittemplate/main.js' // import edittemplate from '../exchangepage/edittemplate/main.js'
import myexchangetemplate from "../exchangepage/mytemplate/main.js"; import myexchangetemplate from "../exchangepage/mytemplate/main.js";
import copyCode from "../exchangecode/copyCode/index";
import { import {
getUserinfo, getUserinfo,
@ -514,6 +515,7 @@ export default class App extends Component {
exact={true} exact={true}
component={accountlist} component={accountlist}
/> />
<Route <Route
path="/home/system/account-add" path="/home/system/account-add"
exact={true} exact={true}
@ -587,6 +589,11 @@ export default class App extends Component {
exact={true} exact={true}
component={exchangecodeedit} component={exchangecodeedit}
/> />
<Route
path="/home/exchangecode-copyCode"
exact={true}
component={copyCode}
/>
<Route <Route
path="/home/exchange-addcommodity" path="/home/exchange-addcommodity"
exact={true} exact={true}

View File

@ -180,6 +180,7 @@ export default class acclist extends React.Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
planStatus:'',//计划状态
dataCount: 0, dataCount: 0,
page: 1, page: 1,
limit: 10, limit: 10,
@ -305,6 +306,7 @@ export default class acclist extends React.Component {
res, res,
(req, msg) => { (req, msg) => {
this.setState({ distdata: req.data }) this.setState({ distdata: req.data })
this.setState({ planStatus: req.plan.status })//计划状态
this.setState({ dataCount: req.total }) this.setState({ dataCount: req.total })
sessionStorage.setItem('key_plan_status', req.plan.status) sessionStorage.setItem('key_plan_status', req.plan.status)
}, },
@ -388,13 +390,14 @@ export default class acclist extends React.Component {
}, },
{ {
path: '/home/exchangecode-add', path: '/home/exchangecode-add',
name: '复制key' name: '复制key:'+row.batch_name
} }
] ]
} }
] ]
sessionStorage.setItem('keybatch_id', row.id) sessionStorage.setItem('keybatch_id', row.id)
sessionStorage.setItem('copyOpearo', 1) sessionStorage.setItem('copyOpearo', 1)
sessionStorage.setItem('key_reseller_id', row.reseller_id)
sessionStorage.setItem('breakchangenav', JSON.stringify(activerou)) sessionStorage.setItem('breakchangenav', JSON.stringify(activerou))
} }
//page //page
@ -861,11 +864,19 @@ export default class acclist extends React.Component {
} }
if (com == 'edit') { if (com == 'edit') {
let str = '' let str = ''
/*628
key创建中1未通过2 不可复制
*/
if (rowData.status == 6 || rowData.status == 7) { if (rowData.status == 6 || rowData.status == 7) {
str = ( str = (
<span> <span>
<a className='grid-link disabled'>编辑</a> <a className='grid-link disabled'>编辑</a>
{
[1,2,8].includes(rowData.status)||[2,6,8,7].includes(this.state.planStatus)?(<a className='grid-link disabled'>复制</a>):(
<a className='grid-link' onClick={(e) => {this.onCopyRow(e, rowData)}}>复制</a>
)
}
<span className='grid-link disabled'>撤销审批</span> <span className='grid-link disabled'>撤销审批</span>
<Dropdown <Dropdown
@ -887,6 +898,11 @@ export default class acclist extends React.Component {
str = ( str = (
<span> <span>
<a className='grid-link disabled'>编辑</a> <a className='grid-link disabled'>编辑</a>
{
[1,2,8].includes(rowData.status)||[2,6,8,7].includes(this.state.planStatus)?(<a className='grid-link disabled'>复制</a>):(
<a className='grid-link' onClick={(e) => {this.onCopyRow(e, rowData)}}>复制</a>
)
}
<span <span
className='grid-link' className='grid-link'
onClick={(e) => this.onReCall(e, rowData)}> onClick={(e) => this.onReCall(e, rowData)}>
@ -934,6 +950,11 @@ export default class acclist extends React.Component {
}}> }}>
编辑 编辑
</a> </a>
{
[1,2,8].includes(rowData.status)||[2,6,8,7].includes(this.state.planStatus)?(<a className='grid-link disabled'>复制</a>):(
<a className='grid-link' onClick={(e) => {this.onCopyRow(e, rowData)}}>复制</a>
)
}
<span className='grid-link disabled'>撤销审批</span> <span className='grid-link disabled'>撤销审批</span>
<Dropdown <Dropdown

View File

@ -304,7 +304,7 @@ export default class adduserinfo extends React.Component {
value={this.state.model.product_name} value={this.state.model.product_name}
placeholder={"请输入"} placeholder={"请输入"}
labelWidth={"0px"} labelWidth={"0px"}
maxLength={16} maxLength={20}
height={"36px"} height={"36px"}
width={"520px"} width={"520px"}
alignment={"left"} alignment={"left"}

View File

@ -616,7 +616,7 @@ export default class adduserinfo extends React.Component {
value={this.state.model.product_name} value={this.state.model.product_name}
placeholder={'请输入'} placeholder={'请输入'}
labelWidth={'0px'} labelWidth={'0px'}
maxLength={16} maxLength={20}
height={'36px'} height={'36px'}
width={'520px'} width={'520px'}
alignment={'left'} alignment={'left'}