Commit 1287d6ae authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 销售订单中止功能对接

parent 0eb675e5
...@@ -131,13 +131,13 @@ export const useBidDetail = (options: OrderDetailHookProps) => { ...@@ -131,13 +131,13 @@ export const useBidDetail = (options: OrderDetailHookProps) => {
setExternalProcurementOrderLogResponses(outRecordRes.data) setExternalProcurementOrderLogResponses(outRecordRes.data)
} }
// // 流程状态(内/外) // 流程状态(内/外)
// // 招投标 // 招投标
// const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId }) const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId })
// if(processRes.code === 1000 && processRes.data) { if(processRes.code === 1000 && processRes.data) {
// setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList) setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList)
// setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList) setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList)
// } }
} }
}, [id]) }, [id])
......
...@@ -59,13 +59,13 @@ export const useConfirmDetail = (options: {}) => { ...@@ -59,13 +59,13 @@ export const useConfirmDetail = (options: {}) => {
setExternalProcurementOrderLogResponses(outRecordRes.data) setExternalProcurementOrderLogResponses(outRecordRes.data)
} }
// // 流程状态(内/外) // 流程状态(内/外)
// // 招投标 // 招投标
// const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId }) const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId })
// if(processRes.code === 1000 && processRes.data) { if(processRes.code === 1000 && processRes.data) {
// setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList) setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList)
// setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList) setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList)
// } }
} }
}, [id]) }, [id])
......
...@@ -51,13 +51,13 @@ export const useRemarkDetail = (options: DetailHookProps) => { ...@@ -51,13 +51,13 @@ export const useRemarkDetail = (options: DetailHookProps) => {
setExternalProcurementOrderLogResponses(outRecordRes.data) setExternalProcurementOrderLogResponses(outRecordRes.data)
} }
// // 流程状态(内/外) // 流程状态(内/外)
// // 招投标 // 招投标
// const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId }) const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId })
// if(processRes.code === 1000 && processRes.data) { if(processRes.code === 1000 && processRes.data) {
// setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList) setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList)
// setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList) setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList)
// } }
} }
}, [id]) }, [id])
......
...@@ -53,13 +53,13 @@ export const useNoticeDetail = (options: DetailHookProps) => { ...@@ -53,13 +53,13 @@ export const useNoticeDetail = (options: DetailHookProps) => {
setExternalProcurementOrderLogResponses(outRecordRes.data) setExternalProcurementOrderLogResponses(outRecordRes.data)
} }
// // 流程状态(内/外) // 流程状态(内/外)
// // 招投标 // 招投标
// const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId }) const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId })
// if(processRes.code === 1000 && processRes.data) { if(processRes.code === 1000 && processRes.data) {
// setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList) setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList)
// setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList) setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList)
// } }
} }
}, [id]) }, [id])
......
...@@ -55,13 +55,13 @@ export const useReportDetail = (options: DetailHookProps) => { ...@@ -55,13 +55,13 @@ export const useReportDetail = (options: DetailHookProps) => {
setExternalProcurementOrderLogResponses(outRecordRes.data) setExternalProcurementOrderLogResponses(outRecordRes.data)
} }
// // 流程状态(内/外) // 流程状态(内/外)
// // 招投标 // 招投标
// const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId }) const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId })
// if(processRes.code === 1000 && processRes.data) { if(processRes.code === 1000 && processRes.data) {
// setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList) setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList)
// setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList) setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList)
// } }
} }
}, [id]) }, [id])
......
...@@ -333,9 +333,8 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => { ...@@ -333,9 +333,8 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
paymentInformationId: PayInfoObj.id, paymentInformationId: PayInfoObj.id,
// 大于100为账期月结 id固定为-1 // 大于100为账期月结 id固定为-1
payTypeId: checked.id >= 100 ? -1 : checked.id, payTypeId: checked.id >= 100 ? -1 : checked.id,
payType: checked.channel, payType: checked.id >= 100 ? current : checked.channel,
} }
if(payStep === 2) { if(payStep === 2) {
if(code.length != number.length){ if(code.length != number.length){
return message.error('请输入支付密码') return message.error('请输入支付密码')
......
...@@ -100,10 +100,10 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => { ...@@ -100,10 +100,10 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
<Col>{v.payNode}</Col> <Col>{v.payNode}</Col>
</Row> </Row>
{ {
v.channel === -1 ? v.payWay === -1 ?
<Row> <Row>
<Col className={style.fontGray} span={4}>支付方式: </Col> <Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{v.payWay === 5 ? '账期' : '月结'}</Col> <Col>{v.channel === 100 ? '账期' : '月结'}</Col>
</Row> </Row>
: :
<> <>
......
...@@ -27,12 +27,15 @@ const fetchTableData = async (params) => { ...@@ -27,12 +27,15 @@ const fetchTableData = async (params) => {
} }
const formActions = createFormActions(); const formActions = createFormActions();
const destroyActions = createFormActions() const destroyActions = createFormActions();
const pauseActions = createFormActions();
const SaleOrder: React.FC<SaleOrderProps> = (props) => { const SaleOrder: React.FC<SaleOrderProps> = (props) => {
const ref = useRef<any>({}) const ref = useRef<any>({})
const destoryRef = useRef<any>({}) const destoryRef = useRef<any>({})
const pauseRef = useRef<any>({})
const { run, loading } = useHttpRequest(PublicApi.postOrderPurchaseOrderCancel) const { run, loading } = useHttpRequest(PublicApi.postOrderPurchaseOrderCancel)
const { run: runPause, loading: loadingEnd } = useHttpRequest(PublicApi.postOrderSuspension)
// 提交取消 // 提交取消
const handleSubmit = useCallback(() => { const handleSubmit = useCallback(() => {
...@@ -47,6 +50,19 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => { ...@@ -47,6 +50,19 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
}) })
}, []) }, [])
// 提交中止
const handleSubmitPause = useCallback(() => {
pauseActions.submit().then(async ({values}: any) => {
const result = await runPause(values)
if (result.code === 1000) {
pauseRef.current.setVisible(false)
setTimeout(() => {
ref.current.reload()
}, 800)
}
})
}, [])
const handleEvaluate = (id) => { const handleEvaluate = (id) => {
history.push(`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated`) history.push(`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated`)
} }
...@@ -57,7 +73,9 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => { ...@@ -57,7 +73,9 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
} }
const handleSuspend = (r) => { const handleSuspend = (r) => {
console.log('TODO') pauseRef.current.setVisible(true)
pauseActions.setFieldValue('id', r.id)
pauseActions.setFieldValue('state', 1)
} }
// 1.(查看)2.(查看、取消订单)3.(查看售后),4.(评价查看售后)5.(提交审核修改删除查看)6.(修改查看),7.(查看中止)8.查看评价9.待新增采购入库单 // 1.(查看)2.(查看、取消订单)3.(查看售后),4.(评价查看售后)5.(提交审核修改删除查看)6.(修改查看),7.(查看中止)8.查看评价9.待新增采购入库单
...@@ -177,6 +195,55 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => { ...@@ -177,6 +195,55 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
}} }}
modalProps={{confirmLoading: loading}} modalProps={{confirmLoading: loading}}
/> />
<ModalForm
modalTitle='中止原因'
currentRef={pauseRef}
confirm={handleSubmitPause}
actions={pauseActions}
schema={{
type: 'object',
properties: {
NO_SUBMIT: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
labelAlign: 'top',
},
properties: {
id: {
type: 'number',
title: '当前id',
visible: false,
},
state: {
type: 'number',
title: '同意',
visible: false,
},
auditOpinion: {
type: 'textarea',
"x-component-props": {
rows: 4,
placeholder: '在此输入你的原因, 最多50个汉字'
},
title: '中止原因',
"x-rules": [
{
required: true,
message: '请输入取消原因'
},
{
limitByte: true,
maxByte: 100
}
]
}
}
}
}
}}
modalProps={{confirmLoading: loadingEnd}}
/>
</PageHeaderWrapper> </PageHeaderWrapper>
} }
......
...@@ -11,9 +11,9 @@ export const useSelfTable = () => { ...@@ -11,9 +11,9 @@ export const useSelfTable = () => {
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id'}) const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id'})
const handleSubmit = async (record) => { const handleSubmit = async (record) => {
if (record.purchaseOrderInteriorState === SaleOrderInsideWorkState.FILLING_ORDER) { // if (record.purchaseOrderInteriorState === SaleOrderInsideWorkState.FILLING_ORDER) {
history.push(`/memberCenter/tranactionAbility/saleOrder/readyReturnDocument/detail?id=${record.id}`) history.push(`/memberCenter/tranactionAbility/saleOrder/readyReturnDocument/detail?id=${record.id}`)
} // }
} }
const secondColumns: any[] = baseOrderListColumns().concat([ const secondColumns: any[] = baseOrderListColumns().concat([
{ {
......
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