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

fix: 商品列表添加商品类型列,品类属性关联属性弹框添加属性组名称筛选,快捷修改单价列表去掉environment字段

parent 53f4800e
......@@ -100,6 +100,7 @@ export default {
'commodity.products.columns.priceType':'Product pricing',
'commodity.products.columns.upperMemberName':'Supply Member',
'commodity.products.columns.upperMemberName.1':'—',
'commodity.products.columns.type' : 'type of merchandise',
'commodity.products.columns.min':'Price',
'commodity.products.columns.currency':'¥',
'commodity.products.columns.applyTime':'Apply for review time',
......
......@@ -101,6 +101,7 @@ export default {
'commodity.products.columns.priceType' : '제품 가격',
'commodity.products.columns.upperMemberName' : '공급원',
'commodity.products.columns.upperMemberName.1' : '—',
'commodity.products.columns.type' : '상품 유형',
'commodity.products.columns.min' : '가격.',
'commodity.products.columns.currency' : '¥',
'commodity.products.columns.applyTime' : '신청 심사 시간',
......
......@@ -101,6 +101,7 @@ export default {
'commodity.products.columns.priceType' : '产品定价',
'commodity.products.columns.upperMemberName' : '供应会员',
'commodity.products.columns.upperMemberName.1' : '—',
'commodity.products.columns.type' : '商品类型',
'commodity.products.columns.min' : '价格',
'commodity.products.columns.currency' : '¥',
'commodity.products.columns.applyTime' : '申请审核时间',
......
......@@ -5,7 +5,7 @@ import {
EyeOutlined
} from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history, useIntl } from 'umi';
import { getIntl, history, useIntl } from 'umi';
import StandardTable from '@/components/StandardTable';
import { ColumnType, TableRowSelection } from 'antd/lib/table/interface';
import styles from './index.less';
......@@ -18,12 +18,62 @@ import Search from '@/components/NiceForm/components/Search'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import { getProductCustomerGetCustomerCategoryAttributeList, getProductCustomerGetCustomerCategoryTree, postProductCustomerDeleteCustomerCategoryAttribute, postProductCustomerSaveCustomerCategoryAttribute } from '@/services/ProductV2Api';
import { ISchema } from '@formily/antd';
const fetchCategoryTreeData = async (params?) => {
const res = await getProductCustomerGetCustomerCategoryTree()
return res
}
const searchSchema: ISchema = {
type: 'object',
properties: {
groupName: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: getIntl().formatMessage({ id: 'classAndProperty.attribute.formProduct.groupName' }),
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
name: {
type: 'string',
"x-component-props": {
placeholder: getIntl().formatMessage({ id: 'classAndProperty.attribute.formProduct.name' }),
style: {
width: 160
}
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: getIntl().formatMessage({ id: 'classAndProperty.attribute.formProduct.submit' })
}
}
}
}
}
}
const CategoryAttributes: React.FC<{}> = () => {
const intl = useIntl();
const ref = useRef<any>({})
......@@ -326,27 +376,14 @@ const CategoryAttributes: React.FC<{}> = () => {
formilyProps={
{
ctx: {
schema: {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'classAndProperty.categoryAttributes.modalTable.formilyProps.name' }),
align: 'flex-left',
advanced: false,
},
},
}
},
schema: searchSchema,
components: { ModalSearch: Search, Submit },
effects: ($, actions) => {
actions.reset()
useStateFilterSearchLinkageEffect(
$,
actions,
'attributeGroupName',
'groupName',
FORM_FILTER_PATH,
);
}
......
......@@ -96,7 +96,7 @@ const viewAtttributes: React.FC<{}> = () => {
<Col span={24}>
<Form.Item name="isEmpty" valuePropName="checked" initialValue={false} noStyle><Checkbox disabled>{intl.formatMessage({ id: 'classAndProperty.viewAttributes.form.setting.isEmpty' })}</Checkbox></Form.Item>
</Col>
<Col span={24}>
{/* <Col span={24}>
<Form.Item name="isImage" valuePropName="checked" initialValue={false} noStyle><Checkbox disabled>{intl.formatMessage({ id: 'classAndProperty.viewAttributes.form.setting.isImage' })}</Checkbox></Form.Item>
<Tooltip title={intl.formatMessage({ id: 'classAndProperty.viewAttributes.form.setting.isImage.tooltip' })}>
<InfoCircleOutlined />
......@@ -107,7 +107,7 @@ const viewAtttributes: React.FC<{}> = () => {
<Tooltip title={intl.formatMessage({ id: 'classAndProperty.viewAttributes.form.setting.isName.tooltip' })}>
<InfoCircleOutlined />
</Tooltip>
</Col>
</Col> */}
<Col span={24}>
<Form.Item name="isPrice" valuePropName="checked" initialValue={false} noStyle><Checkbox disabled>{intl.formatMessage({ id: 'classAndProperty.viewAttributes.form.setting.isPrice' })}</Checkbox></Form.Item>
<Tooltip title={intl.formatMessage({ id: 'classAndProperty.viewAttributes.form.setting.isPrice.tooltip' })}>
......
import React, { useState } from 'react'
import { useIntl } from 'umi'
import { Prompt, useIntl } from 'umi'
import { Row, Col, Tooltip, Popconfirm, Button, Card, message, Modal } from 'antd';
import {
LinkOutlined,
......@@ -43,6 +43,7 @@ const ClassProperty: React.FC<{}> = () => {
const [syncVisible, setSyncVisible] = useState(false)
const [plateformVisible, setPlateformVisible] = useState(false)
const [plateformSelectNode, setPlateformSelectNode] = useState<any>()
const [unsaved, setUnsaved] = useState(false)
const plateformTreeActions = useTreeActions()
const [customPlateformExpandkeys, setCustomPlateformExpandkeys] = useState<any>()
......@@ -237,6 +238,11 @@ const ClassProperty: React.FC<{}> = () => {
flag = false
}
})
$('onFormInputChange').subscribe(() => {
if (!unsaved) {
setUnsaved(true);
}
});
}}
schema={classSchema}
expressionScope={{
......@@ -312,6 +318,7 @@ const ClassProperty: React.FC<{}> = () => {
checkable={true}
/>
</Modal>
<Prompt when={unsaved} message={intl.formatMessage({ id: 'common.tip.save.confirm' }, { default: '您还有未保存的内容,是否确定要离开?' })} />
</PageHeaderWrapper>
}
......
......@@ -125,7 +125,7 @@ const FastModifyPrice: React.FC<{}> = () => {
const fetchData = (params: any) => {
return new Promise((resolve, reject) => {
getProductCommodityGetCommodityDetailList({ ...params, environment: 1 }).then(res => {
getProductCommodityGetCommodityDetailList(params).then(res => {
const { data } = res
resolve(data)
})
......
......@@ -129,10 +129,9 @@ const Products: React.FC<{}> = () => {
render: text => priceTypeLabel[text]
},
{
title: intl.formatMessage({ id: 'commodity.products.columns.upperMemberName' }),
dataIndex: 'upperMemberName',
key: 'upperMemberName',
render: t => t ? t : intl.formatMessage({ id: 'commodity.products.columns.upperMemberName.1' })
title: intl.formatMessage({ id: 'commodity.products.columns.type' }),
dataIndex: 'type',
key: 'type',
},
{
title: intl.formatMessage({ id: 'commodity.products.columns.min' }),
......
......@@ -219,15 +219,6 @@ const Repositories: React.FC<{}> = () => {
}
}
const handleSee = (record: any) => {
console.log('see');
history.push(`/repositories/viewRepository?id=${record.key}`);
};
const confirm = () => {
console.log('confirm');
};
const handleModify = async (record) => {
// 通过传入的params字符串判断是修改那种类型的数据
await postProductFreightSpaceStopStart({
......
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