Commit be480302 authored by shenshaokai's avatar shenshaokai

Merge branch 'fix-20221102' into 'jinfa-20221102'

fix:[47716]新增/修改合同-请购单的采购物料根据供应商做筛选 See merge request project/jinfa-platform!531
parents 55e82319 0c1335c4
......@@ -35,7 +35,7 @@ const FormList = (props: any) => {
} = history.location;
const _state: any = state;
const { currentRef, Row, sourceType, sourceWay, form, deliveryType, getPurchaseData, totalAmountChange } = props;
const { currentRef, Row, sourceType, sourceWay, form, deliveryType, getPurchaseData, totalAmountChange, basicInfo } = props;
const refs = useRef<any>({});
const purchaseRefs = useRef<any>({});
/* 显示模态框 */
......@@ -216,7 +216,7 @@ const FormList = (props: any) => {
/* 获取请购物料 */
const getPurchaseList = (params) => {
return new Promise(resolve => {
getContractPurchaseRequisitionPageToBeCreate(params).then(res => {
getContractPurchaseRequisitionPageToBeCreate({ vendorMemberName: basicInfo.partyBName, ...params }).then(res => {
if (res.code === 1000) {
const data = res.data?.data?.map((i: any) => {
i.id = i.prpId
......@@ -870,6 +870,7 @@ const FormList = (props: any) => {
visible={isPurchaseModalVisible}
onOk={handleOk}
onCancel={handleCancel}
destroyOnClose
>
<StandardTable
tableProps={{
......
......@@ -18,7 +18,7 @@ export const purchaseSchema: ISchema = {
'x-component': 'Search',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'afterService.common.query.applyNo.placeholder' }, { default: '搜索' }),
align: 'flex-left',
align: 'flex-left',
tip: intl.formatMessage({ id: 'afterService.common.query.requisitionNo.tip' }, { default: '输入 请购单号 进行搜索' }),
},
},
......@@ -36,25 +36,25 @@ export const purchaseSchema: ISchema = {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'afterService.common.query.applyAbstract.placeholder' }, { default: '申请单摘要' }),
allowClear: true,
allowClear: true,
},
},
},
consumerName: {
type: 'string',
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'afterService.common.query.consumerName.placeholder' }, { default: '采购供应商' }),
allowClear: true,
allowClear: true,
},
},
},
'[startTime, endTime]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'afterService.common.query.date.placeholder' }, { default: '单据时间(全部)' }),
allowClear: true,
allowClear: true,
},
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......@@ -92,12 +92,12 @@ export const PurchaseContractListSchema: any = {
},
rowStyle: {
flexWrap: 'nowrap',
// flexWrap: 'nowrap',
style: {
marginRight: 10
}
},
},
properties: {
"digest": {
......@@ -106,12 +106,12 @@ export const PurchaseContractListSchema: any = {
placeholder: intl.formatMessage({id: 'contract.qingshuru'})+ intl.formatMessage({id: 'contract.purchase.digest'})
}
},
"vendorMemberName": {
type: 'string',
"x-component-props": {
placeholder: intl.formatMessage({id: 'contract.qingshuru'})+ intl.formatMessage({id: 'contract.purchase.member'})
}
},
// "vendorMemberName": {
// type: 'string',
// "x-component-props": {
// placeholder: intl.formatMessage({id: 'contract.qingshuru'})+ intl.formatMessage({id: 'contract.purchase.member'})
// }
// },
"[startDate,endDate]": {
"type": "daterange",
'x-component-props': {
......
......@@ -179,6 +179,7 @@ const Add: React.FC<{}> = (props: any) => {
deliveryType={deliveryType}
getPurchaseData={getPurchaseData}
totalAmountChange={(num) => setPrice(num)}
basicInfo={basic}
/>
},
{
......
......@@ -23,7 +23,7 @@ const { Option } = Select;
const { Text } = Typography;
const intl = getIntl();
const FormList = (props: any) => {
const { currentRef, purchaseMaterielList, sourceType, form, deliveryType, totalAmountChange, contractChange } = props;
const { currentRef, purchaseMaterielList, sourceType, form, deliveryType, totalAmountChange, contractChange, basicInfo } = props;
const [dataList, setData] = useState([])
const [selectData, setSelectData] = useState<any>([])
const [isPurchaseModalVisible, setIsPurchaseModalVisible] = useState(false);// 显示模态框
......@@ -592,7 +592,7 @@ const FormList = (props: any) => {
/* 获取请购物料 */
const getPurchaseList = (params) => {
return new Promise(resolve => {
getContractPurchaseRequisitionPageToBeCreate(params).then(res => {
getContractPurchaseRequisitionPageToBeCreate({ vendorMemberName: basicInfo.partyBName, ...params }).then(res => {
if (res.code === 1000) {
const data = res.data?.data?.map((i: any) => {
i.id = i.prpId
......@@ -678,7 +678,14 @@ const FormList = (props: any) => {
</Form>
{/* 模态框 */}
<Modal title={intl.formatMessage({ id: 'contract.xuanzecaigouwuliao' })} width={1200} visible={isPurchaseModalVisible} onOk={handleOk} onCancel={handleCancel}>
<Modal
title={intl.formatMessage({ id: 'contract.xuanzecaigouwuliao' })}
width={1200}
visible={isPurchaseModalVisible}
onOk={handleOk}
onCancel={handleCancel}
destroyOnClose
>
<StandardTable
tableProps={{
scroll: { x: 1700 },
......
......@@ -289,6 +289,7 @@ const Editing: React.FC<{}> = (props: any) => {
deliveryType={deliveryType}
totalAmountChange={(num) => setPrice(num)}
contractChange={contractChange}
basicInfo={basic}
/>
},
{
......
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