Commit ab8d6bf8 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理批量新增仓位报方式异常问题

parent 720c34c6
......@@ -34,7 +34,7 @@ const PriceManage: React.FC<{}> = () => {
dataIndex: 'name',
key: 'name',
className: 'commonPickColor',
render: (text: any, record: any) =>
render: (text, record) =>
<EyePreview
url={`/memberCenter/commodityAbility/priceManage/priceStrategy/setStrategy/detail?id=${record.id}&preview=1`}
......@@ -90,7 +90,7 @@ const PriceManage: React.FC<{}> = () => {
title: intl.formatMessage({ id: 'priceManage.priceStrategy.columns.min' }),
dataIndex: 'min',
key: 'min',
render: (text: any, reocrd: any) => {
render: (text, reocrd) => {
if (reocrd.priceType === 1) {
if (reocrd.max === reocrd.min)
return <>{intl.formatMessage({ id: 'priceManage.priceStrategy.columns.currency' })}{reocrd.min}</>
......@@ -111,7 +111,7 @@ const PriceManage: React.FC<{}> = () => {
title: intl.formatMessage({ id: 'priceManage.priceStrategy.columns.isEnable' }),
dataIndex: 'isEnable',
key: 'isEnable',
render: (text: any, record: any) => (
render: (text, record) => (
<AuthButton btnCode='priceManage.state' >
<StatusSwitch
handleConfirm={() => handleUpdateState(record)}
......@@ -138,7 +138,7 @@ const PriceManage: React.FC<{}> = () => {
title: intl.formatMessage({ id: 'priceManage.priceStrategy.columns.option' }),
dataIndex: 'option',
width: 128,
render: (text: any, record: any) => {
render: (text, record) => {
return (
<>
<AuthButton btnCode='priceManage.edit' >
......@@ -155,7 +155,7 @@ const PriceManage: React.FC<{}> = () => {
}
];
const fetchData = (params: any) => {
const fetchData = (params) => {
return new Promise((resolve, reject) => {
getProductCommodityGetUnitPriceStrategyList(params).then(res => {
const { data } = res
......@@ -164,7 +164,7 @@ const PriceManage: React.FC<{}> = () => {
})
}
const handleUpdateState = (record: any) => {
const handleUpdateState = (record) => {
postProductCommodityUpdateUnitPriceStrategyStatus({ id: record.id, isEnable: !record.isEnable }).then(res => {
if (res.code === 1000) {
setTimeout(() => {
......@@ -174,11 +174,11 @@ const PriceManage: React.FC<{}> = () => {
})
}
const handleModify = (record: any) => {
const handleModify = (record) => {
history.push(`${history.location.pathname}/edit?id=${record.id}`)
}
const handleDelete = (record: any) => {
const handleDelete = (record) => {
postProductCommodityDeleteUnitPriceStrategy({ id: record.id }).then(res => {
if (res.code === 1000) {
setTimeout(() => {
......@@ -208,7 +208,7 @@ const PriceManage: React.FC<{}> = () => {
columns={columns}
currentRef={ref}
tableProps={{ rowKey: 'id' }}
fetchTableData={(params: any) => fetchData(params)}
fetchTableData={(params) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
......
......@@ -55,6 +55,7 @@ const BatchAddRepository: React.FC<{}> = () => {
addSchemaAction.getFieldState('shopIds', state => {
params['shopIds'] = state.value.map(item => state.props['x-component-props'].dataSource.filter(_ => _.id === item)[0])
})
params['inventoryDeductWay'] = 1
let res = await postProductFreightSpaceAddBatch(params)
if (res.code === 1000) {
setTimeout(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment