Commit 782d121a by qinjianhui

fix: 对账单待确认加驳回

parent 0c69be4f
......@@ -105,13 +105,16 @@ export function getOrderBySubOrderNumber(orderNumber: string) {
)
}
export function getQaOrderBySubOrderNumber(orderNumber: string,shipmentUid?:string) {
export function getQaOrderBySubOrderNumber(
orderNumber: string,
shipmentUid?: string,
) {
return axios.get<never, BaseRespData<QaData[]>>(
'factory/customJomallOrder/inspectionQuery',
{
params: {
subOrderNumber: orderNumber,
shipmentUid:shipmentUid,
shipmentUid: shipmentUid,
},
},
)
......@@ -356,8 +359,20 @@ export function getShipmentOrderDetailById(id?: number | string) {
}
export function confirmOrderApi(data: ConfirmOrderForm) {
return axios.post<never, BaseRespData<never>>(
'reconciliation/confirm',
data,
)
}
\ No newline at end of file
return axios.post<never, BaseRespData<never>>('reconciliation/confirm', data)
}
export function rejectOrderApi({
ids,
description,
pass
}: {
ids: string
pass: number
description: string
}) {
return axios.post<never, BaseRespData<never>>('reconciliation/confirm', {
ids,
description,
pass
})
}
......@@ -117,13 +117,13 @@
>
确认对账单
</el-button>
<!-- <el-button
v-if="nodeId === 20"
<el-button
v-if="nodeId === 10"
type="warning"
@click="auditOrder('pay')"
@click="rejectOrder"
>
付款
</el-button> -->
驳回
</el-button>
<el-button
v-if="nodeId === 30"
type="danger"
......@@ -532,11 +532,13 @@
:key="index"
style="display: flex"
>
<span style="display: inline-block;">
<span style="display: inline-block">
{{ item.create_time }}
</span>
<span style="margin: 0 5px 0 20px;">{{ item.employee_account }}</span>
<span style="display: inline-block;">{{
<span style="margin: 0 5px 0 20px">{{
item.employee_account
}}</span>
<span style="display: inline-block">{{
item.description
}}</span>
</li>
......@@ -606,6 +608,7 @@ import {
auditOrderApi,
getShipmentOrderDetailById,
confirmOrderApi,
rejectOrderApi,
} from '@/api/order'
import { ref, onMounted, watch, nextTick } from 'vue'
......@@ -620,6 +623,7 @@ import {
import { ShipmentOrderDetailData } from '@/types/api/deliveryNote'
import shipmentOrderDetailInfo from '@/components/ShipmentOrderDetail.vue'
import ImageView from '@/components/ImageView.vue'
import { showConfirm } from '@/utils/ui'
// import { getUserMarkList } from '@/api/auth.ts'
interface Tree {
......@@ -818,17 +822,62 @@ const auditOrder = (key: string) => {
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 }) => {
const ids = selections.value.map((el) => el.id).join(',')
try {
await rejectOrderApi({ ids: ids, description: value, pass: 0 })
ElMessage.success('操作成功')
search()
await getTreeNum()
} catch (e) {
console.error(e)
}
})
}
const confirmOrder = async () => {
if (selections.value.length === 0) {
return ElMessage.warning('请选择要操作的数据')
}
confirmOrderVisible.value = true
auditForm.value = {
pass: 1,
description: '',
try {
await showConfirm('是否确认对账单?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
const ids = selections.value.map((el) => el.id).join(',')
try {
await confirmOrderApi({
ids,
})
confirmOrderVisible.value = false
ElMessage.success('操作成功')
search()
await getTreeNum()
} catch (e) {
console.error(e)
}
await nextTick()
auditFormRef.value!.clearValidate()
// confirmOrderVisible.value = true
// auditForm.value = {
// pass: 1,
// description: '',
// }
// await nextTick()
// auditFormRef.value!.clearValidate()
}
const submitConfirmOrder = async () => {
try {
......
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