Commit 58eef8fd by zhuzhequan

校验报错修改

parent 7f59d288
...@@ -1046,9 +1046,6 @@ import usePageList from '@/utils/hooks/usePageList' ...@@ -1046,9 +1046,6 @@ import usePageList from '@/utils/hooks/usePageList'
import { useValue } from '@/utils/hooks/useValue' import { useValue } from '@/utils/hooks/useValue'
import BigNumber from 'bignumber.js' import BigNumber from 'bignumber.js'
import { import {
auditOrderApi,
confirmPodOrderApi,
apiRejectionOfReview,
apiSetCraftData, apiSetCraftData,
podUsReconciliation, podUsReconciliation,
podUsReconciliationList, podUsReconciliationList,
...@@ -1154,11 +1151,6 @@ const batchUpdate = async ( ...@@ -1154,11 +1151,6 @@ const batchUpdate = async (
} }
batchUpdateVisible.value = true batchUpdateVisible.value = true
} }
const getSelectionsProperty = (property: keyof AccountStatementNote) => {
return selections.value
.map((el: AccountStatementNote) => el[property])
.join(',')
}
const handleDetailSizeChange = (size: number) => { const handleDetailSizeChange = (size: number) => {
detailPager.value.rows = size detailPager.value.rows = size
...@@ -1377,65 +1369,7 @@ const auditForm = ref({ ...@@ -1377,65 +1369,7 @@ const auditForm = ref({
description: '', description: '',
}) })
const auditFormRef = ref() const auditFormRef = ref()
const auditOrder = (key: string) => {
let url = ''
let text = ''
switch (key) {
case 'pay':
url = 'pod/podReconciliation/payment'
text = '确认付款'
break
case 'archive':
url = 'pod/podReconciliation/archiving'
text = '确认归档'
break
}
if (selections.value.length === 0) {
return ElMessage.warning('请选择要操作的数据')
}
ElMessageBox.confirm(`${text}对账单?`, '重要提示', {
confirmButtonText: '确定',
type: 'warning',
}).then(async () => {
const ids = selections.value
.map((el: AccountStatementNote) => el.id)
.join(',')
await auditOrderApi(url, ids)
ElMessage.success('操作成功')
search()
await getTreeNum()
})
}
const rejectOrder = () => {
if (selections.value.length === 0) {
return ElMessage.warning('请选择要操作的数据')
}
ElMessageBox.prompt('请输入驳回原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
inputPattern: /.+/,
customClass: 'reject',
inputErrorMessage: '请输入驳回原因',
inputPlaceholder: '驳回原因',
}).then(async ({ value }: { value: string }) => {
const ids = getSelectionsProperty('id')
const recNumbers = getSelectionsProperty('rec_number')
try {
await apiRejectionOfReview({
ids: ids,
description: value,
recNumbers: recNumbers,
})
ElMessage.success('操作成功')
search()
await getTreeNum()
} catch (e) {
console.error(e)
}
})
}
const confirmOrder = async (item: AccountStatementNote) => { const confirmOrder = async (item: AccountStatementNote) => {
currentRow.value = item currentRow.value = item
confirmOrderVisible.value = true confirmOrderVisible.value = true
......
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