销售审批
This commit is contained in:
@ -44,7 +44,8 @@
|
||||
import { useFormConfig } from '/@/hooks/web/useFormConfig';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { setIndexFlowStatus } from '/@/utils/flow/index'
|
||||
import { getLngPngAppro } from '/@/api/dayPlan/PngAppro';
|
||||
import { getLngPngAppro,getLngPngApproPageGd, getLngPngApproPageJsz, approveLngPngApproSZ, approveLngPngApproGD, approveLngPngAppro
|
||||
} from '/@/api/dayPlan/PngAppro';
|
||||
import { useModal,BasicModal } from '/@/components/Modal';
|
||||
import LookProcess from '/@/views/workflow/task/components/LookProcess.vue';
|
||||
import LaunchProcess from '/@/views/workflow/task/components/LaunchProcess.vue';
|
||||
@ -95,7 +96,6 @@
|
||||
const { currentRoute } = useRouter();
|
||||
const router = useRouter();
|
||||
const path = currentRoute.value?.path
|
||||
console.log(currentRoute, 'router55555555555555', path)
|
||||
const formIdComputedRef = ref();
|
||||
formIdComputedRef.value = currentRoute.value.meta.formId
|
||||
const schemaIdComputedRef = ref();
|
||||
@ -108,7 +108,7 @@
|
||||
const formDataRef = ref();
|
||||
const rowKeyData = ref();
|
||||
const draftsId = ref();
|
||||
|
||||
const selectedKeys = ref([])
|
||||
const visibleApproveProcessRef = ref(false);
|
||||
const taskIdRef = ref('');
|
||||
const visibleFlowRecordModal = ref(false);
|
||||
@ -117,21 +117,29 @@
|
||||
|
||||
let formName='管道气销售审批';
|
||||
let curPath = 'dayPlan/PngAppro/index'
|
||||
let request = ''
|
||||
let requestApprove = ''
|
||||
if (path.includes('dayPlan/PngAppro/index')) {
|
||||
formName='管道气销售审批'
|
||||
curPath = 'dayPlan/PngAppro/index'
|
||||
request = getLngPngApproPage
|
||||
requestApprove = approveLngPngAppro
|
||||
}
|
||||
if (path.includes('dayPlan/pngPipeAppro/index')) {
|
||||
formName='管道气管道审批'
|
||||
curPath = 'dayPlan/pngPipeAppro'
|
||||
request = getLngPngApproPageGd
|
||||
requestApprove = approveLngPngApproGD
|
||||
}
|
||||
if (path.includes('dayPlan/pngReceiveStationAppro/index')) {
|
||||
formName='管道气接收站审批'
|
||||
curPath = 'dayPlan/pngReceiveStationAppro'
|
||||
request = getLngPngApproPageJsz
|
||||
requestApprove = approveLngPngApproSZ
|
||||
}
|
||||
const [registerTable, { reload, clearSelectedRowKeys, setTableData }] = useTable({
|
||||
title: '' || (formName + '列表'),
|
||||
api: getLngPngApproPage,
|
||||
api: request,
|
||||
rowKey: 'id',
|
||||
columns: customConfigColums,
|
||||
formConfig: {
|
||||
@ -182,7 +190,7 @@
|
||||
|
||||
});
|
||||
const btnCheck = (record)=> {
|
||||
openModalApproStatus(true,{isUpdate: false,id:record.id});
|
||||
openModalApproStatus(true,{isUpdate: false,id:record.demandId});
|
||||
}
|
||||
function onSelectChange(rowKeys: string[]) {
|
||||
selectedKeys.value = rowKeys;
|
||||
@ -277,8 +285,32 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
function handleBatchApprove () {
|
||||
setTableData([{verNo: 5, cuCode: 444, approName: '未提交'}])
|
||||
async function handleBatchApprove () {
|
||||
if (!selectedKeys.value.length) {
|
||||
notification.warning({
|
||||
message: 'Tip',
|
||||
description: t('请选择需要审批的数据'),
|
||||
});
|
||||
return;
|
||||
}
|
||||
let arr = selectedKeys.value.map(v=> {
|
||||
return {
|
||||
id: v
|
||||
}
|
||||
})
|
||||
|
||||
let obj = {
|
||||
"result": "C",
|
||||
"remark": "",
|
||||
"data": arr
|
||||
}
|
||||
await requestApprove(obj)
|
||||
handleSuccess();
|
||||
notification.success({
|
||||
message: 'Tip',
|
||||
description: t('审批成功!'),
|
||||
});
|
||||
clearSelectedRowKeys()
|
||||
|
||||
}
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user