Commit ff072944 authored by Bill's avatar Bill

fix: 修改物料提价逻辑,

parent afb448dd
......@@ -62,7 +62,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
},
{
title: '规格型号',
value: 'M20型号'
value: initialValue?.type
},
{
title: '品牌',
......@@ -74,7 +74,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
},
{
title: '备注',
value: initialValue?.remark || ''
value: initialValue?.remake || ''
},
{
title: '品类',
......@@ -150,7 +150,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
{
title: '附件',
render: (text, record) => {
const value = { name: '设计图纸pdf', url: '' };
const value = { name: record.name, url: record.url };
return (
<FileItem value={value} />
)
......@@ -158,10 +158,10 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
},
{
title: '备注',
dataIndex: 'desc'
dataIndex: 'description'
}
]
}, [initialValue])
}, [])
/**
* 内部单据流转记录
......
......@@ -9,7 +9,7 @@ import { Button, Card, Cascader, message, Modal, Popconfirm, Space, Spin } from
import { getColumn } from '../common/columns';
import { createFormActions, Schema } from '@formily/antd';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { GetProductGoodsGetMaterialListRequest, getProductGoodsGetSubGoodsList, getProductGoodsGetToBeAddGoodsList, postProductGoodsDeleteBatchGoods, postProductGoodsSubmit } from '@/services/ProductV2Api';
import { GetProductGoodsGetMaterialListRequest, getProductGoodsGetSubGoodsList, getProductGoodsGetToBeAddGoodsList, getProductMaterialProcessIsExistMaterialProcess, postProductGoodsDeleteBatchGoods, postProductGoodsSubmit } from '@/services/ProductV2Api';
import { SearchParams } from '../materialQuery';
import { EMPTY, fetchBrand, fetchCategoryData, fetchTreeData, useAsyncCascader } from '../common/useGetTableSearchData';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
......@@ -44,17 +44,30 @@ const MaterialQuery = () => {
const handleSubmit = async (_row) => {
setIsLoading((prev) => prev.concat(_row.id))
try {
const { data, code } = await postProductGoodsSubmit({ id: _row.id });
if (code === 1000) {
formActions.submit();
} else if (code === 43149) {
const materialGroupId = _row.materialGroup?.id
? { materialGroupId: _row.materialGroup?.id }
: {}
const processRes = await getProductMaterialProcessIsExistMaterialProcess({
materialId: _row.id,
processType: _row.interiorState === 1 ? `1` : `2`,
...materialGroupId,
} as any)
if (processRes.code !== 1000 || !processRes.data) {
Modal.warning({
title: '提交提醒',
content: `当前还未创建审核工作流, 请在物料审核流程规则配置设置`,
content: (
<div>当前还未创建审核工作流, 请在<a target={"_blank"} href={`/memberCenter/commodityAbility/material/materialAuditProcessConfig`}>物料审核流程规则配置</a>设置</div>
),
onOk() {
console.log('OK');
},
});
return;
}
const { data, code } = await postProductGoodsSubmit({ id: _row.id });
if (code === 1000) {
formActions.submit();
}
} catch(e) {}
finally {
......
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