提交 af391b01 作者: 龚洪江

Merge branch 'master' into develop

......@@ -14,4 +14,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly/admin
newTag: 794a651d8a2ae19cb46bf37a8e434a4f8040a80f
newTag: 3018428edaf6324b1a6b636ac94c4202918e3b9c
......@@ -249,29 +249,21 @@ const SkuAddOrEditModal: FC<ModalProps & selfProps> = ({
//新增一行规格值
const addSkuDataRowClick = () => {
const list = [
...tableData,
{
id: Math.random(),
channelPrice: 0,
partNo: '',
salePrice: 0,
showPrice: 1,
specValueImage: '',
specValueName: '',
stock: 0,
fileList: [],
},
];
setTableData(list);
const obj = list.reduce((pre: any, cur: any) => {
Object.getOwnPropertyNames(cur).forEach((key: string) => {
if (['showPrice'].includes(key)) {
pre[key + cur.id] = cur[key];
}
});
return pre;
}, {});
const tableItem = {
id: Math.random(),
channelPrice: 0,
partNo: '',
salePrice: 0,
showPrice: 1,
specValueImage: '',
specValueName: '',
stock: 0,
fileList: [],
};
setTableData([...tableData, tableItem]);
//设置价格显示默认值
const obj = Object.create(null);
obj[`showPrice${tableItem.id}`] = 1;
goodsSpecValuesForm.setFieldsValue(obj);
};
//移除一行规格值
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论