feat:

1、新增刷新红包批次号特性
2、uuid生成规则更唯一
This commit is contained in:
wangsongsole 2023-06-30 10:33:06 +08:00
parent 0d118e4a9b
commit 52ab4669f4
4 changed files with 31 additions and 7 deletions

View File

@ -22,7 +22,8 @@ import {
Tag, Tag,
TimeRangePicker, TimeRangePicker,
DatePicker, DatePicker,
BlockHeader BlockHeader,
Button
} from "zent" } from "zent"
import isArray from "lodash/isArray" import isArray from "lodash/isArray"
import cloneDeep from "lodash/cloneDeep" import cloneDeep from "lodash/cloneDeep"
@ -248,7 +249,7 @@ export default class addKnockGold extends Component {
model.effect_date = [] model.effect_date = []
model.effect_date[0] = begin_time model.effect_date[0] = begin_time
model.effect_date[1] = end_time model.effect_date[1] = end_time
model.copy && (model.cash_activity_id = uuid()) /* 是否是复制 */ model.copy && (model.cash_activity_id = uuid(12)) /* 是否是复制 */
/* 以下操作 筛选出输入框的预警值并经行填充 */ /* 以下操作 筛选出输入框的预警值并经行填充 */
const copy_early_per = early_per || [] const copy_early_per = early_per || []
copy_early_per.map((item) => { copy_early_per.map((item) => {
@ -561,9 +562,15 @@ export default class addKnockGold extends Component {
labelWidth={"0px"} labelWidth={"0px"}
maxLength={50} maxLength={50}
height={"36px"} height={"36px"}
width={"520px"} width={"452px"}
alignment={"left"} alignment={"left"}
/> />
<Button
type="icon"
icon="refresh"
onClick={() => this.onHandleChange(uuid(12), "cash_activity_id")}
disabled={this.state.isEdit}
></Button>
</FormItem> </FormItem>
<FormItem labelname="批次商品名称" prop="batch_goods_name" id="batch_goods_name"> <FormItem labelname="批次商品名称" prop="batch_goods_name" id="batch_goods_name">
<Ipt <Ipt

View File

@ -213,6 +213,24 @@
z-index: 1001 !important; z-index: 1001 !important;
} }
#batch_number {
.form-compontent {
display: flex;
.zent-btn {
height: 36px;
font-size: 18px;
color: #155bd4;
}
.zent-btn-disabled {
color: #ccc;
cursor: not-allowed;
pointer-events: all
}
}
}
.w-e-text-container { .w-e-text-container {
border-bottom: 0 !important; border-bottom: 0 !important;
} }

View File

@ -25,7 +25,7 @@ export function model({ data }) {
model: { model: {
channel: 1, // 渠道 channel: 1, // 渠道
cash_amount_type: "1", // 红包类型 cash_amount_type: "1", // 红包类型
cash_activity_id: uuid(), // 红包批次号 cash_activity_id: uuid(12), // 红包批次号
batch_goods_name: "", // 批次商品名称 batch_goods_name: "", // 批次商品名称
num: "", // 红包个数 num: "", // 红包个数
denomination: "", // 面额 denomination: "", // 面额

View File

@ -36,8 +36,7 @@ export function uuid(len, radix) {
} }
} }
} }
return uuid.join("") + new Date().valueOf()
return uuid.join("")
} }
//计算两个时间差 返回天 //计算两个时间差 返回天