| | |
| | | import OrderSettlementDetailDialog from './components/OrderSettlementDetailDialog.vue'; |
| | | import { useGetStandardOrders } from '@/hooks'; |
| | | import { EnumStandardOrderSettlementStatusText } from '@/constants'; |
| | | import * as standardOrderServices from '@/services/api/standardOrder'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { toThousand } from '@/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'OrderSettlementManage', |
| | |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | const { getList, proTableProps, paginationState, extraParamState, reset } = useGetStandardOrders(); |
| | | const { getList, proTableProps, paginationState, extraParamState, reset } = useGetStandardOrders({ |
| | | isSettlement: true, |
| | | }); |
| | | |
| | | onMounted(async () => { |
| | | await getList(); |
| | | state.loading = false; |
| | | }); |
| | | |
| | | async function handleSettlement(row) {} |
| | | async function handleSettlement(row: API.GetStandardOrdersQueryResultItem) { |
| | | try { |
| | | await Message.tipMessage( |
| | | `确认将${toThousand(row.settlementAmount)}元结算给${row.supplierEnterpriseName}吗?` |
| | | ); |
| | | let params: API.SettlementStandardOrderCommand = { |
| | | id: row.id, |
| | | }; |
| | | let res = await standardOrderServices.settlementStandardOrder(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | const { dialogProps, handleEdit, editForm } = useFormDialog({ |
| | | defaultFormParams: { |
| | |
| | | }, |
| | | }); |
| | | |
| | | function openDialog(row) { |
| | | function openDialog(row: API.GetStandardOrdersQueryResultItem) { |
| | | handleEdit({ |
| | | id: row.id, |
| | | }); |