feat: 新增,编辑和复制
This commit is contained in:
parent
cac2c318a5
commit
e0def52bf3
|
@ -952,12 +952,14 @@ export default class addKnockGold extends Component {
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{/* 批量需改主体 */}
|
{/* 批量需改主体 */}
|
||||||
<VoucherBatch
|
{this.state.subjectList.length > 0 && (
|
||||||
ref="voucherBatchRef"
|
<VoucherBatch
|
||||||
channel={this.state.model.channel}
|
ref="voucherBatchRef"
|
||||||
subjectList={this.state.subjectList}
|
channel={this.state.model.channel}
|
||||||
voucherBatchData={this.props.data?.voucher_batch}
|
subjectList={this.state.subjectList}
|
||||||
></VoucherBatch>
|
voucherBatchData={this.props.data?.voucher_batch}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<FormItem labelname="批次商品名称" prop="batch_goods_name" id="batch_goods_name">
|
<FormItem labelname="批次商品名称" prop="batch_goods_name" id="batch_goods_name">
|
||||||
<Ipt
|
<Ipt
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Grid, Input, Select, Button, Notify } from "zent"
|
import { Grid, Input, Select, Button, Notify } from "zent"
|
||||||
import { useCallback, useState, useMemo, forwardRef, useImperativeHandle, useEffect } from "react"
|
import { useCallback, useState, useMemo, forwardRef, useImperativeHandle, useEffect } from "react"
|
||||||
import { useUpdateEffect } from "ahooks"
|
import { useUpdateEffect } from "ahooks"
|
||||||
import { isPosIntNumber } from "@/tools/validate"
|
|
||||||
|
|
||||||
const VoucherBatch = forwardRef((props, ref) => {
|
const VoucherBatch = forwardRef((props, ref) => {
|
||||||
const { channel, voucherBatchData, subjectList } = props
|
const { channel, voucherBatchData, subjectList } = props
|
||||||
|
@ -29,7 +28,10 @@ const VoucherBatch = forwardRef((props, ref) => {
|
||||||
)
|
)
|
||||||
|
|
||||||
const [datasets, setDatasets] = useState(() => {
|
const [datasets, setDatasets] = useState(() => {
|
||||||
|
console.log("voucherBatchData =>", voucherBatchData)
|
||||||
|
console.log("subjectList =>", subjectList)
|
||||||
if (voucherBatchData) {
|
if (voucherBatchData) {
|
||||||
|
debugger
|
||||||
let new_data = voucherBatchData.map((item) => {
|
let new_data = voucherBatchData.map((item) => {
|
||||||
let provider_el = subjectList.find((row) => row.key === item.provider)
|
let provider_el = subjectList.find((row) => row.key === item.provider)
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue