管道气 接收站审批
This commit is contained in:
@ -193,18 +193,8 @@
|
||||
return
|
||||
}
|
||||
}
|
||||
let request = ''
|
||||
if (formPath.includes('dayPlan/PngAppro/index')) {
|
||||
request = approveLngPngAppro
|
||||
}
|
||||
if (formPath.includes('dayPlan/pngPipeAppro/index')) {
|
||||
request = approveLngPngApproGD
|
||||
}
|
||||
if (formPath.includes('dayPlan/pngReceiveStationAppro/index')) {
|
||||
request = approveLngPngApproSZ
|
||||
}
|
||||
spinning.value = true;
|
||||
await request(params);
|
||||
await approveLngPngAppro(params);
|
||||
spinning.value = false;
|
||||
notification.success({
|
||||
message: 'Tip',
|
||||
|
||||
@ -117,29 +117,9 @@
|
||||
|
||||
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: request,
|
||||
api: getLngPngApproPage,
|
||||
rowKey: 'id',
|
||||
columns: customConfigColums,
|
||||
formConfig: {
|
||||
@ -304,7 +284,7 @@
|
||||
"remark": "",
|
||||
"data": arr
|
||||
}
|
||||
await requestApprove(obj)
|
||||
await approveLngPngAppro(obj)
|
||||
handleSuccess();
|
||||
notification.success({
|
||||
message: 'Tip',
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<PngApproModal @register="registerModal" @success="handleSuccess" />
|
||||
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
||||
<approStatusModal @register="registerApproStatus" ></approStatusModal>
|
||||
<rejectReplyModal @register="registerRejectReply" @success="handleRejectReply" />
|
||||
<rejectReplyModal :visible="isOpen" @success="handleRejectReply" />
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@ -78,22 +78,27 @@
|
||||
|
||||
const tableRef = ref();
|
||||
//所有按钮
|
||||
const buttons = ref([{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":true},{"isUse":true,"name":"驳回","code":"reject","icon":"ant-design:stop-outlined","isDefault":true},{"isUse":true,"name":"审批通过","code":"batchapprove","icon":"ant-design:check-outlined","isDefault":true}]);
|
||||
const buttons = ref([{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},
|
||||
{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},
|
||||
{"isUse":true,"name":"审批","code":"approveGD","icon":"ant-design:check-outlined","isDefault":true},
|
||||
{"isUse":true,"name":"驳回","code":"reject","icon":"ant-design:stop-outlined","isDefault":true},
|
||||
]);
|
||||
//展示在列表内的按钮
|
||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','approve','reject']);
|
||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','approveGD','reject']);
|
||||
const buttonConfigs = computed(()=>{
|
||||
return filterButtonAuth(buttons.value);
|
||||
})
|
||||
|
||||
const tableButtonConfig = computed(() => {
|
||||
return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
|
||||
// return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
|
||||
return [{"isUse":true,"name":"审批通过","code":"approveGD","icon":"ant-design:check-outlined","isDefault":true}]
|
||||
});
|
||||
|
||||
const actionButtonConfig = computed(() => {
|
||||
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
||||
});
|
||||
|
||||
const btnEvent = {refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,approve : handleApprove,reject: handleReject,batchapprove: handleBatchApprove}
|
||||
const btnEvent = {refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,approveGD : handleApprove,reject: handleReject}
|
||||
|
||||
const { currentRoute } = useRouter();
|
||||
const router = useRouter();
|
||||
@ -117,6 +122,7 @@
|
||||
const [registerModal, { openModal}] = useModal();
|
||||
const [registerApproStatus, { openModal: openModalApproStatus}] = useModal();
|
||||
const [registerRejectReply, { openModal: openModalRejectReply}] = useModal();
|
||||
const isOpen = ref(false)
|
||||
|
||||
const curData = ref({})
|
||||
let formName='管道气销售审批';
|
||||
@ -269,7 +275,7 @@
|
||||
}
|
||||
function handleReject (record: Recordable) {
|
||||
curData.value = record
|
||||
openModalRejectReply(true,{isUpdate: false});
|
||||
isOpen.value = true
|
||||
}
|
||||
const handleRejectReply = async (val) => {
|
||||
let obj = {
|
||||
@ -278,6 +284,7 @@
|
||||
"data": [{datePlan: curData.value.datePlan}]
|
||||
}
|
||||
await requestApprove(obj)
|
||||
isOpen.value = false
|
||||
handleSuccess();
|
||||
notification.success({
|
||||
message: 'Tip',
|
||||
|
||||
Reference in New Issue
Block a user