fix:修复【后台】【兑换码】创建中兑换码,生效开始时间不能编辑。

This commit is contained in:
wangsongsole 2022-10-28 10:20:11 +08:00
parent f5010cb4fa
commit a1f8d69f9d
2 changed files with 8 additions and 2 deletions

View File

@ -132,6 +132,7 @@ export default class exchangeAdd extends React.Component {
res,
(req) => {
let reqCopy = _.cloneDeep(req)
this.codeStatus = req.status
const resData = this.transFormData(reqCopy.goods)
reqCopy.goods = resData
let codeInfo = {
@ -1131,7 +1132,11 @@ export default class exchangeAdd extends React.Component {
format: "HH:mm:ss",
defaultTime: ["00:00:00", "23:59:59"]
}}
disabled={[this.state.isState === 2, false]}
disabled={[
this.state.isState === 2 &&
[1, 2, 3, 7].includes(this.codeStatus),
false
]}
format='YYYY-MM-DD HH:mm:ss'
value={this.state.codeInfo.date_time}
onChange={(e) => {

View File

@ -172,6 +172,7 @@ export const init = () => {
addIsType: "",
isState: 0 /* 0:新增 1:复制 2:编辑 */,
planSelectData: [] /* 归属计划数据 */,
keyBatchSelectData: [] /* 归属key数据 */
keyBatchSelectData: [] /* 归属key数据 */,
codeStatus: "" /* 兑换码状态 */
}
}