Commit da376f14 authored by Bill's avatar Bill

Merge branch 'fix-home-auth' into 'v2-220418'

fix: 采购选品修改参考品牌 See merge request linkseeks-design/pro-platform!253
parents b88802ea c7aaf418
......@@ -68,6 +68,8 @@ const MaterialAdd = (props) => {
formActions.setFieldState('sourceListCard', (state) => {
FormPath.setIn(state, 'visible', true);
})
console.log(state.dataSource)
if (!state.dataSource) {
message.error(intl.formatMessage({ id: 'material.should.select.purchaseSelection', defaultMessage: '请选择采购选品'}));
}
......@@ -135,6 +137,17 @@ const MaterialAdd = (props) => {
</UploadFiles>
)
const createDescriptionElement = () => {
return {
desc() {
if (query?.type !== 'sourceData' ) {
return null;
}
return React.createElement('div', { className: styles['label-required'] }, `参考品牌: ${state.dataSource?.referenceBrand}`);
}
}
};
const handleSubmit = async (value) => {
console.log("values", value);
const {
......@@ -299,7 +312,8 @@ const MaterialAdd = (props) => {
// renderListTableRemove: renderListTableRemove,
renderAddition: renderAddition(),
uploadContainer: uploadContainer,
customizeFileItemRender: customizeFileItemRender
customizeFileItemRender: customizeFileItemRender,
...createDescriptionElement(),
}}
effects={($, actions) => {
useAsyncCascader('category', fetchCategoryData)
......
......@@ -264,7 +264,7 @@ const MaterialQuery = () => {
name: target.name,
goodsId: target.id,
type: target.type,
brand: target.brand?.name,
referenceBrand: target.brand?.name,
goodsPic: target.goodsPic?.map((_item) => {
return {
name: _item,
......@@ -288,6 +288,7 @@ const MaterialQuery = () => {
// rowSelection: selectRow
rowSelection: selectRow
}}
keepAlive={false}
columns={columns}
currentRef={ref}
fetchTableData={fetchListData}
......@@ -300,7 +301,7 @@ const MaterialQuery = () => {
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'code', FORM_FILTER_PATH);
useAsyncCascader('materialGroupId', fetchTreeData)
useAsyncCascader('categoryId', fetchCategoryData)
useAsyncCascader('customerCategoryId', fetchCategoryData)
useAsyncSelect('brandId', fetchBrand, ["name", "id"])
}}
/>
......
......@@ -128,6 +128,7 @@ export const getSchema = (schema: ISchema): ISchema => {
'x-component-props': {
showSearch: true,
},
description: `{{desc()}}`
},
category: {
title: intl.formatMessage({ id: 'material.category', defaultMessage: '品类' }),
......
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