Commit de85055d authored by 靳野's avatar 靳野

Revert "fix: 处理g显示问题"

This reverts commit b4e94350.
parent b4e94350
...@@ -315,7 +315,7 @@ const FormPriceOrStock = forwardRef((props, ref) => { ...@@ -315,7 +315,7 @@ const FormPriceOrStock = forwardRef((props, ref) => {
inputType: 'text', inputType: 'text',
}); });
} }
// console.log('customer.isGold :>> ', customer.isGold);
// isGoodsManage用来判断是否是popGoodsManage页面,这个页面是用来应付审计团队的,没有实际功能,这里删掉了供货价字段,正常业务逻辑不用考虑这个字段,这就用第一个数据就好了 // isGoodsManage用来判断是否是popGoodsManage页面,这个页面是用来应付审计团队的,没有实际功能,这里删掉了供货价字段,正常业务逻辑不用考虑这个字段,这就用第一个数据就好了
const isGoodsManage = window.location.pathname.indexOf('popGoodsManage') < 0; const isGoodsManage = window.location.pathname.indexOf('popGoodsManage') < 0;
const dynamicColumns = [ const dynamicColumns = [
...@@ -456,7 +456,7 @@ const FormPriceOrStock = forwardRef((props, ref) => { ...@@ -456,7 +456,7 @@ const FormPriceOrStock = forwardRef((props, ref) => {
setMergeTable(Boolean(editData.secondSpecValue && editData.secondSpecValue.length)); setMergeTable(Boolean(editData.secondSpecValue && editData.secondSpecValue.length));
setTableData(fliterSkuListSortData(skuList) || []); setTableData(fliterSkuListSortData(skuList) || []);
} }
}, [customer.isEdit, customer.isUseCache, editData, skuList, customer.isGold]); }, [customer.isEdit, customer.isUseCache, editData, skuList]);
useEffect(() => { useEffect(() => {
if (!editData) { if (!editData) {
......
...@@ -159,173 +159,170 @@ export const WeeksList = [ ...@@ -159,173 +159,170 @@ export const WeeksList = [
value: 7, value: 7,
}, },
]; ];
export const StaticColumns = customer => export const StaticColumns = customer => [
// console.log('StaticColumns customer.isGold :>> ', customer.isGold); {
[ title: '供货价',
{ dataIndex: 'supplyPrice',
title: '供货价', editable: true,
dataIndex: 'supplyPrice', batchRole: [1, 2, 3, 4],
editable: true, roleProps: {
batchRole: [1, 2, 3, 4], precision: 2,
roleProps: { min: 0,
precision: 2,
min: 0,
},
batchProps: {
precision: 2,
min: 0,
},
roleRules: { required: true },
disabeldRender: () => customer.isDisabled,
}, },
{ batchProps: {
title: '佣金费率', precision: 2,
dataIndex: 'commissionRate', min: 0,
editable: true,
role: [4],
roleRules: { required: false },
roleProps: {
min: 0,
},
// batchProps: {
// min: 0,
// },
}, },
{ roleRules: { required: true },
title: '市场价', disabeldRender: () => customer.isDisabled,
dataIndex: 'marketPrice', },
editable: true, {
batchRole: [1, 2, 3, 4], title: '佣金费率',
roleProps: { dataIndex: 'commissionRate',
precision: 2, editable: true,
min: 0, role: [4],
}, roleRules: { required: false },
batchProps: { roleProps: {
precision: 2, min: 0,
min: 0,
},
roleRules: { required: true },
disabeldRender: () => customer.isDisabled,
}, },
{ // batchProps: {
title: '销售价', // min: 0,
dataIndex: 'salePrice', // },
editable: true, },
batchRole: [4], {
role: [4], title: '市场价',
roleRules: { required: true }, dataIndex: 'marketPrice',
roleProps: { editable: true,
precision: 2, batchRole: [1, 2, 3, 4],
min: 0, roleProps: {
}, precision: 2,
batchProps: { min: 0,
precision: 2,
min: 0,
},
disabeldRender: () => customer.isDisabled,
}, },
{ batchProps: {
title: `重量(${customer.isGold ? 'g' : 'kg'})`, precision: 2,
dataIndex: 'weight', min: 0,
editable: true,
batchRole: [1],
batchProps: {
min: 0,
precision: customer.isGold ? 2 : 3,
max: customer.isGold ? 100 : 999999.999,
},
role: [1],
roleRules: { required: true },
roleProps: {
min: 0,
precision: customer.isGold ? 2 : 3,
max: customer.isGold ? 100 : 999999.999,
},
disabeldRender: () => customer.isDisabled,
}, },
{ roleRules: { required: true },
title: '库存', disabeldRender: () => customer.isDisabled,
dataIndex: 'productStock', },
editable: true, {
role: [1, 2, 4], title: '销售价',
batchRole: [1, 2, 4], dataIndex: 'salePrice',
batchProps: { editable: true,
precision: 0, batchRole: [4],
step: 1, role: [4],
min: 0, roleRules: { required: true },
}, roleProps: {
roleProps: { precision: 2,
min: 0, min: 0,
step: 1,
precision: 0,
},
roleRules: { required: true },
disabeldRender: record => {
if (record.stock === null) return false;
return customer.isEdit && customer.isNormal;
},
}, },
{ batchProps: {
title: '库存预警', precision: 2,
dataIndex: 'productStockWarning', min: 0,
editable: true, },
batchRole: [1], disabeldRender: () => customer.isDisabled,
role: [1, 4], },
roleProps: { {
min: 0, title: `重量(${customer.isGold ? 'g' : 'kg'})`,
precision: 0, dataIndex: 'weight',
maxLength: 5, editable: true,
}, batchRole: [1],
batchProps: { batchProps: {
min: 0, min: 0,
precision: 0, precision: customer.isGold ? 2 : 3,
maxLength: 5, max: customer.isGold ? 100 : 999999.999,
}, },
disabeldRender: () => customer.isDisabled, role: [1],
roleRules: { required: true },
roleProps: {
min: 0,
precision: customer.isGold ? 2 : 3,
max: customer.isGold ? 100 : 999999.999,
}, },
{ disabeldRender: () => customer.isDisabled,
title: '商品自编码', },
dataIndex: 'thirdSkuNo', {
editable: true, title: '库存',
role: [1, 2], dataIndex: 'productStock',
inputType: 'input', editable: true,
roleRules: { required: true }, role: [1, 2, 4],
disabeldRender: () => customer.isDisabled, batchRole: [1, 2, 4],
batchProps: {
precision: 0,
step: 1,
min: 0,
},
roleProps: {
min: 0,
step: 1,
precision: 0,
}, },
{ roleRules: { required: true },
title: '京东链接', disabeldRender: record => {
dataIndex: 'skuLink', if (record.stock === null) return false;
editable: true, return customer.isEdit && customer.isNormal;
role: [1, 2],
inputType: 'input',
roleRules: { required: false },
disabeldRender: () => customer.isDisabled,
}, },
{ },
title: 'sku名称', {
dataIndex: 'name', title: '库存预警',
editable: true, dataIndex: 'productStockWarning',
role: customer.isEdit && customer.isJDGoods ? [1, 2] : [], editable: true,
inputType: 'btnText', batchRole: [1],
roleRules: { required: false }, role: [1, 4],
disabeldRender: () => customer.isDisabled, roleProps: {
min: 0,
precision: 0,
maxLength: 5,
}, },
{ batchProps: {
title: '操作', min: 0,
editable: true, precision: 0,
dataIndex: 'option', maxLength: 5,
role: [1, 2],
inputType: 'option',
roleProps: {
isJDGoods: customer.isJDGoods,
disabled: customer.isDisabled,
min: 0,
},
roleRules: { required: false },
disabeldRender: () => customer.isDisabled,
}, },
]; disabeldRender: () => customer.isDisabled,
},
{
title: '商品自编码',
dataIndex: 'thirdSkuNo',
editable: true,
role: [1, 2],
inputType: 'input',
roleRules: { required: true },
disabeldRender: () => customer.isDisabled,
},
{
title: '京东链接',
dataIndex: 'skuLink',
editable: true,
role: [1, 2],
inputType: 'input',
roleRules: { required: false },
disabeldRender: () => customer.isDisabled,
},
{
title: 'sku名称',
dataIndex: 'name',
editable: true,
role: customer.isEdit && customer.isJDGoods ? [1, 2] : [],
inputType: 'btnText',
roleRules: { required: false },
disabeldRender: () => customer.isDisabled,
},
{
title: '操作',
editable: true,
dataIndex: 'option',
role: [1, 2],
inputType: 'option',
roleProps: {
isJDGoods: customer.isJDGoods,
disabled: customer.isDisabled,
min: 0,
},
roleRules: { required: false },
disabeldRender: () => customer.isDisabled,
},
];
// 这部分是用来应付审计团队的,没有实际功能,这里删掉了供货价字段,正常业务逻辑不用考虑这里 // 这部分是用来应付审计团队的,没有实际功能,这里删掉了供货价字段,正常业务逻辑不用考虑这里
export const StaticColumnsPop = customer => [ export const StaticColumnsPop = customer => [
{ {
......
...@@ -527,7 +527,6 @@ const ServiceGoods = options => { ...@@ -527,7 +527,6 @@ const ServiceGoods = options => {
isUseCache, // 是否使用缓存数据 isUseCache, // 是否使用缓存数据
onEventBus, onEventBus,
}; };
// console.log('providerValue.isGold :>> ', providerValue.isGold);
return ( return (
<Modal <Modal
......
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