mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 02:42:49 +09:00
fix : 결재함에서 전표상세시 협조버튼 결재선 모달 폼 완성
This commit is contained in:
@@ -5,6 +5,7 @@ import PriceDetail from "/@src/pages/app/priceDetail.vue";
|
||||
import {conveterNo, updateApprovalStatus} from "/@src/service/approvalApi.ts";
|
||||
import {formatDatefromString} from "/@src/utils/common/comfunc.ts";
|
||||
import DocumentManagementDetail from "/@src/pages/app/documentManagementDetail.vue";
|
||||
import {updateTempSlip} from "/@src/service/slipApi.ts";
|
||||
|
||||
const gubunMap = {
|
||||
SAP: '전표생성',
|
||||
@@ -18,6 +19,7 @@ onBeforeMount(async () => {
|
||||
})
|
||||
|
||||
const isModalOpen = ref(false)
|
||||
const subModalOpen = ref(false)
|
||||
const selectedRow = ref<any>(null)
|
||||
const prcsNo = ref<string>('')
|
||||
let apprNo = ref<string>('')
|
||||
@@ -51,6 +53,12 @@ const params = reactive({
|
||||
],
|
||||
approvalParams: [],
|
||||
rowData: [],
|
||||
cooperationData: [],
|
||||
cooperColumn:[
|
||||
{ key: 'lineclsf', label: '결재구분' },
|
||||
{ key: 'bname', label: '사번' },
|
||||
{ key: 'abscd', label: '사유코드(근태)' },
|
||||
]
|
||||
})
|
||||
|
||||
const searchParamsList = reactive({
|
||||
@@ -185,6 +193,46 @@ watch(currentPage, (newParams) => {
|
||||
currentPage.value = newParams
|
||||
searchApproval(currentPage.value)
|
||||
})
|
||||
|
||||
const getCooperation = () => {
|
||||
console.log("data",data)
|
||||
params.cooperationData = data
|
||||
}
|
||||
const loading = ref(false)
|
||||
const updateChit = async () => {
|
||||
let res = null
|
||||
try{
|
||||
loading.value = true
|
||||
// if (validation()){
|
||||
// const createParams = {
|
||||
// belnr : params.contNo, //전표번호
|
||||
// wkfid : //요청번호(협조용)
|
||||
// wkftx : //결재제목
|
||||
// apprs : {
|
||||
// label: "0605145807", 명칭 //!!!!!!!뭔 값인지 모름
|
||||
// apprs : [{
|
||||
// label: '결재',
|
||||
// value: apprLine.value.map((req) => ({
|
||||
// lineclsf : req.lineclsf, //결재구분
|
||||
// bname : req.bname, //사번
|
||||
// abscd : req.abscd //사유코드(근태)
|
||||
// }))
|
||||
// }]
|
||||
// }
|
||||
// }
|
||||
notyf.dismissAll()
|
||||
// res = await updateTempSlip(createParams)
|
||||
if(res.request.status == '200'){
|
||||
notyf.primary('결재선이 수정 되었습니다.')
|
||||
router.push({path: '/app/ApprovalManagement'})
|
||||
}
|
||||
// }
|
||||
}catch(e){
|
||||
notyf.error(e.message)
|
||||
}finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -301,13 +349,43 @@ watch(currentPage, (newParams) => {
|
||||
@close="isModalOpen = false"
|
||||
>
|
||||
<template #content>
|
||||
<PriceDetail v-if="params.rowData.gubun === 'SVCM'" :prcsNo="prcsNo" />
|
||||
<PriceDetail v-if="params.rowData.gubun === 'SVCM'" :prcsNo="prcsNo" @buttonClick="getCooperation"/>
|
||||
<document-management-detail v-else-if="params.rowData.gubun === 'SAP'" :apprNo="apprNo" />
|
||||
<div v-else>지원하지 않는 구분입니다.</div>
|
||||
</template>
|
||||
<template #action>
|
||||
<VButton type="submit" color="info" raised @click="updateIntegratedPaymentRejectionFunc">반려</VButton>
|
||||
<VButton type="submit" color="primary" raised @click="updateIntegratedPaymentApprovalFunc">승인</VButton>
|
||||
<VButton type="submit" color="info" raised v-if="params.rowData.gubun === 'SAP'" @click="subModalOpen= true">협조</VButton>
|
||||
<VButton type="submit" color="primary" raised v-if="params.rowData.gubun === 'SAP'" @click="updateIntegratedPaymentApprovalFunc">결재</VButton>
|
||||
</template>
|
||||
</VModal>
|
||||
<VModal
|
||||
:open="subModalOpen"
|
||||
actions="center"
|
||||
title="협조 리스트"
|
||||
size="contract-big"
|
||||
cancelLabel="닫기"
|
||||
@close="subModalOpen = false"
|
||||
>
|
||||
<template #content>
|
||||
<VUserSap/>
|
||||
<ComVFlexTable
|
||||
:key="params.cooperationData.length"
|
||||
:data="params.cooperationData"
|
||||
:columns="params.cooperColumn"
|
||||
:separators="true"
|
||||
>
|
||||
<template #body-cell="{ row, column, index, value }">
|
||||
<!-- 예: 특정 컬럼이면 input, 아니면 그냥 값 출력 -->
|
||||
<div>
|
||||
<span>{{ value }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</ComVFlexTable>
|
||||
</template>
|
||||
<template #action>
|
||||
<VButton type="submit" color="info" raised @click="">협조등록</VButton>
|
||||
</template>
|
||||
</VModal>
|
||||
<VFlexPagination
|
||||
|
||||
@@ -17,12 +17,15 @@ onBeforeMount(async ()=>{
|
||||
}else if(props.apprNo){
|
||||
const sapApprNo = await sapApprConveterNo(props.apprNo)
|
||||
result = await getSlipDetail(sapApprNo.data.contNo)
|
||||
emits('buttonClick',result)
|
||||
}
|
||||
getDetailList(result)
|
||||
apprLine.value = result.zwf0011t.apprs
|
||||
selectedTab.value = apprLine.value[0].value
|
||||
})
|
||||
|
||||
const emits = defineEmits<{
|
||||
(e: 'buttonClick', data: any): void
|
||||
}>()
|
||||
const notyf = useNotyf()
|
||||
const apprLine = ref<VTabsItem[]>([])
|
||||
const getDetailList = (item) => {
|
||||
|
||||
@@ -1,5 +1,53 @@
|
||||
import axios from 'axios'
|
||||
|
||||
/**
|
||||
* SAP결재상태 변경
|
||||
* @param {object} params
|
||||
* @property {string} params
|
||||
* @returns
|
||||
*/
|
||||
export async function changeSapApprStatus(params = {}) {
|
||||
try {
|
||||
console.log(params)
|
||||
const result = await axios.get(`/api/sap/appr`,params)
|
||||
return result
|
||||
}
|
||||
catch (e) {
|
||||
if (e.response) {
|
||||
if (e.response.status >= 500) {
|
||||
throw new Error('서버 오류가 발생했습니다.')
|
||||
} else if (e.response.status >= 400) {
|
||||
throw new Error('잘못된 요청입니다.')
|
||||
}
|
||||
}
|
||||
throw new Error(e.message)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* SAP(협조) 결재 저장
|
||||
* @param {object} params
|
||||
* @property {string} params
|
||||
* @returns
|
||||
*/
|
||||
export async function saveSapAppr(params = {}) {
|
||||
try {
|
||||
console.log(params)
|
||||
const result = await axios.post(`/api/sap/appr`,params)
|
||||
return result
|
||||
}
|
||||
catch (e) {
|
||||
if (e.response) {
|
||||
if (e.response.status >= 500) {
|
||||
throw new Error('서버 오류가 발생했습니다.')
|
||||
} else if (e.response.status >= 400) {
|
||||
throw new Error('잘못된 요청입니다.')
|
||||
}
|
||||
}
|
||||
throw new Error(e.message)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* SAP결재번호를 계약결재번호로 변경
|
||||
* @param {object} params
|
||||
|
||||
Reference in New Issue
Block a user