Commit 1dd0abad authored by shida.liu's avatar shida.liu

Merge branch 'feat-fake-pop-order-mession' into feature-20250212-fake-long-number

parents c9967881 909cdb62
...@@ -202,7 +202,7 @@ class goodsManage extends Component { ...@@ -202,7 +202,7 @@ class goodsManage extends Component {
))} ))}
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="供货价区间"> {/* <FormItem label="供货价区间">
<FormItem name="supplyPriceMin" className={styles.iptNumRight} noStyle> <FormItem name="supplyPriceMin" className={styles.iptNumRight} noStyle>
<InputNumber placeholder="请输入" min={0} max={999999999} style={iptNumWidth} /> <InputNumber placeholder="请输入" min={0} max={999999999} style={iptNumWidth} />
</FormItem> </FormItem>
...@@ -218,7 +218,7 @@ class goodsManage extends Component { ...@@ -218,7 +218,7 @@ class goodsManage extends Component {
onChange={this.valueMin} onChange={this.valueMin}
/> />
</FormItem> </FormItem>
</FormItem> </FormItem> */}
<FormItem name="thirdSkuNo" label="第三方SKU编码"> <FormItem name="thirdSkuNo" label="第三方SKU编码">
<Input placeholder="请输入第三方SKU编码" allowClear style={selectW} /> <Input placeholder="请输入第三方SKU编码" allowClear style={selectW} />
</FormItem> </FormItem>
......
...@@ -12,7 +12,7 @@ import React, { ...@@ -12,7 +12,7 @@ import React, {
memo, memo,
} from 'react'; } from 'react';
// import { unstable_batchedUpdates } from 'react-dom'; // import { unstable_batchedUpdates } from 'react-dom';
import { formItemLayout, StaticColumns } from '../config'; import { formItemLayout, StaticColumns, StaticColumnsPop } from '../config';
import EditFormTable from './EditFormTable'; import EditFormTable from './EditFormTable';
import FormPackage from './FormPackage'; import FormPackage from './FormPackage';
import { import {
...@@ -316,7 +316,13 @@ const FormPriceOrStock = forwardRef((props, ref) => { ...@@ -316,7 +316,13 @@ const FormPriceOrStock = forwardRef((props, ref) => {
inputType: 'text', inputType: 'text',
}); });
} }
const dynamicColumns = [...columsData, ...StaticColumns(customer)];
// isGoodsManage用来判断是否是popGoodsManage页面,这个页面是用来应付审计团队的,没有实际功能,这里删掉了供货价字段,正常业务逻辑不用考虑这个字段,这就用第一个数据就好了
const isGoodsManage = window.location.pathname.indexOf('popGoodsManage') < 0;
const dynamicColumns = [
...columsData,
...(isGoodsManage ? StaticColumns(customer) : StaticColumnsPop(customer)),
];
setDefaultColumns(dynamicColumns); setDefaultColumns(dynamicColumns);
}; };
......
...@@ -159,323 +159,319 @@ export const WeeksList = [ ...@@ -159,323 +159,319 @@ export const WeeksList = [
value: 7, value: 7,
}, },
]; ];
// isGoodsManage用来判断是否是popGoodsManage页面,这个页面是用来应付审计团队的,没有实际功能,这里删掉了供货价字段,正常业务逻辑不用考虑这个字段,这就用第一个数据就好了 export const StaticColumns = customer => [
const isGoodsManage = window.location.pathname.indexOf('popGoodsManage') < 0; {
export const StaticColumns = customer => title: '供货价',
isGoodsManage dataIndex: 'supplyPrice',
? [ editable: true,
{ batchRole: [1, 2, 3, 4],
title: '供货价', roleProps: {
dataIndex: 'supplyPrice', precision: 2,
editable: true, min: 0,
batchRole: [1, 2, 3, 4], },
roleProps: { batchProps: {
precision: 2, precision: 2,
min: 0, min: 0,
}, },
batchProps: { roleRules: { required: true },
precision: 2, disabeldRender: () => customer.isDisabled,
min: 0, },
}, {
roleRules: { required: true }, title: '佣金费率',
disabeldRender: () => customer.isDisabled, dataIndex: 'commissionRate',
}, editable: true,
{ role: [4],
title: '佣金费率', roleRules: { required: false },
dataIndex: 'commissionRate', roleProps: {
editable: true, min: 0,
role: [4], },
roleRules: { required: false }, // batchProps: {
roleProps: { // min: 0,
min: 0, // },
}, },
// batchProps: { {
// min: 0, title: '市场价',
// }, dataIndex: 'marketPrice',
}, editable: true,
{ batchRole: [1, 2, 3, 4],
title: '市场价', roleProps: {
dataIndex: 'marketPrice', precision: 2,
editable: true, min: 0,
batchRole: [1, 2, 3, 4], },
roleProps: { batchProps: {
precision: 2, precision: 2,
min: 0, min: 0,
}, },
batchProps: { roleRules: { required: true },
precision: 2, disabeldRender: () => customer.isDisabled,
min: 0, },
}, {
roleRules: { required: true }, title: '销售价',
disabeldRender: () => customer.isDisabled, dataIndex: 'salePrice',
}, editable: true,
{ batchRole: [4],
title: '销售价', role: [4],
dataIndex: 'salePrice', roleRules: { required: true },
editable: true, roleProps: {
batchRole: [4], precision: 2,
role: [4], min: 0,
roleRules: { required: true }, },
roleProps: { batchProps: {
precision: 2, precision: 2,
min: 0, min: 0,
}, },
batchProps: { disabeldRender: () => customer.isDisabled,
precision: 2, },
min: 0, {
}, title: `重量(${customer.isGold ? 'g' : 'kg'})`,
disabeldRender: () => customer.isDisabled, dataIndex: 'weight',
}, editable: true,
{ batchRole: [1],
title: `重量(${customer.isGold ? 'g' : 'kg'})`, batchProps: {
dataIndex: 'weight', min: 0,
editable: true, precision: customer.isGold ? 2 : 3,
batchRole: [1], max: customer.isGold ? 100 : 999999.999,
batchProps: { },
min: 0, role: [1],
precision: customer.isGold ? 2 : 3, roleRules: { required: true },
max: customer.isGold ? 100 : 999999.999, roleProps: {
}, min: 0,
role: [1], precision: customer.isGold ? 2 : 3,
roleRules: { required: true }, max: customer.isGold ? 100 : 999999.999,
roleProps: { },
min: 0, disabeldRender: () => customer.isDisabled,
precision: customer.isGold ? 2 : 3, },
max: customer.isGold ? 100 : 999999.999, {
}, title: '库存',
disabeldRender: () => customer.isDisabled, dataIndex: 'productStock',
}, editable: true,
{ role: [1, 2, 4],
title: '库存', batchRole: [1, 2, 4],
dataIndex: 'productStock', batchProps: {
editable: true, precision: 0,
role: [1, 2, 4], step: 1,
batchRole: [1, 2, 4], min: 0,
batchProps: { },
precision: 0, roleProps: {
step: 1, min: 0,
min: 0, step: 1,
}, precision: 0,
roleProps: { },
min: 0, roleRules: { required: true },
step: 1, disabeldRender: record => {
precision: 0, if (record.stock === null) return false;
}, return customer.isEdit && customer.isNormal;
roleRules: { required: true }, },
disabeldRender: record => { },
if (record.stock === null) return false; {
return customer.isEdit && customer.isNormal; title: '库存预警',
}, dataIndex: 'productStockWarning',
}, editable: true,
{ batchRole: [1],
title: '库存预警', role: [1, 4],
dataIndex: 'productStockWarning', roleProps: {
editable: true, min: 0,
batchRole: [1], precision: 0,
role: [1, 4], maxLength: 5,
roleProps: { },
min: 0, batchProps: {
precision: 0, min: 0,
maxLength: 5, precision: 0,
}, maxLength: 5,
batchProps: { },
min: 0, disabeldRender: () => customer.isDisabled,
precision: 0, },
maxLength: 5, {
}, title: '商品自编码',
disabeldRender: () => customer.isDisabled, dataIndex: 'thirdSkuNo',
}, editable: true,
{ role: [1, 2],
title: '商品自编码', inputType: 'input',
dataIndex: 'thirdSkuNo', roleRules: { required: true },
editable: true, disabeldRender: () => customer.isDisabled,
role: [1, 2], },
inputType: 'input', {
roleRules: { required: true }, title: '京东链接',
disabeldRender: () => customer.isDisabled, dataIndex: 'skuLink',
}, editable: true,
{ role: [1, 2],
title: '京东链接', inputType: 'input',
dataIndex: 'skuLink', roleRules: { required: false },
editable: true, disabeldRender: () => customer.isDisabled,
role: [1, 2], },
inputType: 'input', {
roleRules: { required: false }, title: 'sku名称',
disabeldRender: () => customer.isDisabled, dataIndex: 'name',
}, editable: true,
{ role: customer.isEdit && customer.isJDGoods ? [1, 2] : [],
title: 'sku名称', inputType: 'btnText',
dataIndex: 'name', roleRules: { required: false },
editable: true, disabeldRender: () => customer.isDisabled,
role: customer.isEdit && customer.isJDGoods ? [1, 2] : [], },
inputType: 'btnText', {
roleRules: { required: false }, title: '操作',
disabeldRender: () => customer.isDisabled, editable: true,
}, dataIndex: 'option',
{ role: [1, 2],
title: '操作', inputType: 'option',
editable: true, roleProps: {
dataIndex: 'option', isJDGoods: customer.isJDGoods,
role: [1, 2], disabled: customer.isDisabled,
inputType: 'option', min: 0,
roleProps: { },
isJDGoods: customer.isJDGoods, roleRules: { required: false },
disabled: customer.isDisabled, disabeldRender: () => customer.isDisabled,
min: 0, },
}, ];
roleRules: { required: false }, // 这部分是用来应付审计团队的,没有实际功能,这里删掉了供货价字段,正常业务逻辑不用考虑这里
disabeldRender: () => customer.isDisabled, export const StaticColumnsPop = customer => [
}, {
] title: '佣金费率',
: [ dataIndex: 'commissionRate',
// 这部分是用来应付审计团队的,没有实际功能,这里删掉了供货价字段,正常业务逻辑不用考虑这里 editable: true,
{ role: [4],
title: '佣金费率', roleRules: { required: false },
dataIndex: 'commissionRate', roleProps: {
editable: true, min: 0,
role: [4], },
roleRules: { required: false }, // batchProps: {
roleProps: { // min: 0,
min: 0, // },
}, },
// batchProps: { {
// min: 0, title: '市场价',
// }, dataIndex: 'marketPrice',
}, editable: true,
{ batchRole: [1, 2, 3, 4],
title: '市场价', roleProps: {
dataIndex: 'marketPrice', precision: 2,
editable: true, min: 0,
batchRole: [1, 2, 3, 4], },
roleProps: { batchProps: {
precision: 2, precision: 2,
min: 0, min: 0,
}, },
batchProps: { roleRules: { required: true },
precision: 2, disabeldRender: () => customer.isDisabled,
min: 0, },
}, {
roleRules: { required: true }, title: '销售价',
disabeldRender: () => customer.isDisabled, dataIndex: 'salePrice',
}, editable: true,
{ batchRole: [4],
title: '销售价', role: [4],
dataIndex: 'salePrice', roleRules: { required: true },
editable: true, roleProps: {
batchRole: [4], precision: 2,
role: [4], min: 0,
roleRules: { required: true }, },
roleProps: { batchProps: {
precision: 2, precision: 2,
min: 0, min: 0,
}, },
batchProps: { disabeldRender: () => customer.isDisabled,
precision: 2, },
min: 0, {
}, title: `重量(${customer.isGold ? 'g' : 'kg'})`,
disabeldRender: () => customer.isDisabled, dataIndex: 'weight',
}, editable: true,
{ batchRole: [1],
title: `重量(${customer.isGold ? 'g' : 'kg'})`, batchProps: {
dataIndex: 'weight', min: 0,
editable: true, precision: customer.isGold ? 2 : 3,
batchRole: [1], max: customer.isGold ? 100 : 999999.999,
batchProps: { },
min: 0, role: [1],
precision: customer.isGold ? 2 : 3, roleRules: { required: true },
max: customer.isGold ? 100 : 999999.999, roleProps: {
}, min: 0,
role: [1], precision: customer.isGold ? 2 : 3,
roleRules: { required: true }, max: customer.isGold ? 100 : 999999.999,
roleProps: { },
min: 0, disabeldRender: () => customer.isDisabled,
precision: customer.isGold ? 2 : 3, },
max: customer.isGold ? 100 : 999999.999, {
}, title: '库存',
disabeldRender: () => customer.isDisabled, dataIndex: 'productStock',
}, editable: true,
{ role: [1, 2, 4],
title: '库存', batchRole: [1, 2, 4],
dataIndex: 'productStock', batchProps: {
editable: true, precision: 0,
role: [1, 2, 4], step: 1,
batchRole: [1, 2, 4], min: 0,
batchProps: { },
precision: 0, roleProps: {
step: 1, min: 0,
min: 0, step: 1,
}, precision: 0,
roleProps: { },
min: 0, roleRules: { required: true },
step: 1, disabeldRender: record => {
precision: 0, if (record.stock === null) return false;
}, return customer.isEdit && customer.isNormal;
roleRules: { required: true }, },
disabeldRender: record => { },
if (record.stock === null) return false; {
return customer.isEdit && customer.isNormal; title: '库存预警',
}, dataIndex: 'productStockWarning',
}, editable: true,
{ batchRole: [1],
title: '库存预警', role: [1, 4],
dataIndex: 'productStockWarning', roleProps: {
editable: true, min: 0,
batchRole: [1], precision: 0,
role: [1, 4], maxLength: 5,
roleProps: { },
min: 0, batchProps: {
precision: 0, min: 0,
maxLength: 5, precision: 0,
}, maxLength: 5,
batchProps: { },
min: 0, disabeldRender: () => customer.isDisabled,
precision: 0, },
maxLength: 5, {
}, title: '商品自编码',
disabeldRender: () => customer.isDisabled, dataIndex: 'thirdSkuNo',
}, editable: true,
{ role: [1, 2],
title: '商品自编码', inputType: 'input',
dataIndex: 'thirdSkuNo', roleRules: { required: true },
editable: true, disabeldRender: () => customer.isDisabled,
role: [1, 2], },
inputType: 'input', {
roleRules: { required: true }, title: '京东链接',
disabeldRender: () => customer.isDisabled, dataIndex: 'skuLink',
}, editable: true,
{ role: [1, 2],
title: '京东链接', inputType: 'input',
dataIndex: 'skuLink', roleRules: { required: false },
editable: true, disabeldRender: () => customer.isDisabled,
role: [1, 2], },
inputType: 'input', {
roleRules: { required: false }, title: 'sku名称',
disabeldRender: () => customer.isDisabled, dataIndex: 'name',
}, editable: true,
{ role: customer.isEdit && customer.isJDGoods ? [1, 2] : [],
title: 'sku名称', inputType: 'btnText',
dataIndex: 'name', roleRules: { required: false },
editable: true, disabeldRender: () => customer.isDisabled,
role: customer.isEdit && customer.isJDGoods ? [1, 2] : [], },
inputType: 'btnText', {
roleRules: { required: false }, title: '操作',
disabeldRender: () => customer.isDisabled, editable: true,
}, dataIndex: 'option',
{ role: [1, 2],
title: '操作', inputType: 'option',
editable: true, roleProps: {
dataIndex: 'option', isJDGoods: customer.isJDGoods,
role: [1, 2], disabled: customer.isDisabled,
inputType: 'option', min: 0,
roleProps: { },
isJDGoods: customer.isJDGoods, roleRules: { required: false },
disabled: customer.isDisabled, disabeldRender: () => customer.isDisabled,
min: 0, },
}, ];
roleRules: { required: false },
disabeldRender: () => customer.isDisabled,
},
];
export const ENUM_REPERTORY = [{ label: '单规格', value: '1' }, { label: '多规格', value: '2' }]; export const ENUM_REPERTORY = [{ label: '单规格', value: '1' }, { label: '多规格', value: '2' }];
export const ENUM_SET_REPERTORY = [{ label: '清零', value: '0' }, { label: '最大', value: '1' }]; export const ENUM_SET_REPERTORY = [{ label: '清零', value: '0' }, { label: '最大', value: '1' }];
export const ENUM_WEEK = [ export const ENUM_WEEK = [
......
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