项目所有删除和编辑接口对接
This commit is contained in:
@@ -24,6 +24,25 @@ export const FinanceLoan = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑调账申请
|
||||||
|
export const FinanceEditAccounts = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('times', data.times)
|
||||||
|
formData.append('ContractNo', data.ContractNo)
|
||||||
|
formData.append('CustomerID', data.CustomerID)
|
||||||
|
formData.append('amount', data.amount)
|
||||||
|
formData.append('situation', data.situation)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/editAccounts`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 调账申请展示
|
// 调账申请展示
|
||||||
export const FinanceLoandisplay = (data: any) => {
|
export const FinanceLoandisplay = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -43,3 +62,17 @@ export const FinanceLoandisplay = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除调账申请
|
||||||
|
export const FinanceDeleteAccounts = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/deleteAccounts`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import { isFile } from '@/utils/auxiliaryFunction'
|
||||||
const AUTH_BASE_URL = '/api2'
|
const AUTH_BASE_URL = '/api2'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -25,6 +26,26 @@ export const BusinessApplication = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑申请用印
|
||||||
|
export const BusinessEditApplication = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('Printingpurpose', data.Printingpurpose)
|
||||||
|
formData.append('CaseNumber', data.CaseNumber)
|
||||||
|
formData.append('Reason', data.Reason)
|
||||||
|
formData.append('seal_number', data.seal_number)
|
||||||
|
formData.append('seal_type', data.seal_type)
|
||||||
|
if (isFile(data.file)) formData.append('file', data.file)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/editApplication`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 申请用印展示
|
// 申请用印展示
|
||||||
export const BusinessApplicationdetail = (data: any) => {
|
export const BusinessApplicationdetail = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -44,3 +65,17 @@ export const BusinessApplicationdetail = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除申请用印
|
||||||
|
export const BusinessDeleteApplication = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/deleteApplication`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import { isFile } from '@/utils/auxiliaryFunction'
|
||||||
const AUTH_BASE_URL = '/api2'
|
const AUTH_BASE_URL = '/api2'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -24,6 +25,25 @@ export const BusinessBid = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑投标登记
|
||||||
|
export const BusinessEditBid = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('BiddingUnit', data.BiddingUnit)
|
||||||
|
formData.append('ProjectName', data.ProjectName)
|
||||||
|
formData.append('times', data.times)
|
||||||
|
if (isFile(data.BiddingAnnouncement))
|
||||||
|
formData.append('BiddingAnnouncement', data.BiddingAnnouncement)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/editBid`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 投标登记展示
|
// 投标登记展示
|
||||||
export const BusinessBiddetail = (data: any) => {
|
export const BusinessBiddetail = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -44,3 +64,17 @@ export const BusinessBiddetail = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除投标登记
|
||||||
|
export const BusinessDeleteBid = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/deleteBid`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import { isFile } from '@/utils/auxiliaryFunction'
|
||||||
const AUTH_BASE_URL = '/api2'
|
const AUTH_BASE_URL = '/api2'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -26,6 +27,27 @@ export const BusinessCasemanagement = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑案件管理信息
|
||||||
|
export const BusinessEditCase = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('times', data.times)
|
||||||
|
if (isFile(data.AgencyContract)) formData.append('AgencyContract', data.AgencyContract)
|
||||||
|
if (isFile(data.Contractreturn)) formData.append('Contractreturn', data.Contractreturn)
|
||||||
|
if (isFile(data.Closingapplication))
|
||||||
|
formData.append('Closingapplication', data.Closingapplication)
|
||||||
|
formData.append('ChangeRequest', data.ChangeRequest)
|
||||||
|
formData.append('paymentcollection', data.paymentcollection)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/editCase`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 案件分页查询
|
// 案件分页查询
|
||||||
export const BusinessCasemanagementdetail = (data: any) => {
|
export const BusinessCasemanagementdetail = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -46,6 +68,20 @@ export const BusinessCasemanagementdetail = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除案件管理
|
||||||
|
export const BusinessDeleteCase = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/deleteCase`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 案件已收款(累加)
|
// 案件已收款(累加)
|
||||||
export const BusinessAccumulate = (data: any) => {
|
export const BusinessAccumulate = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import { isFile } from '@/utils/auxiliaryFunction'
|
||||||
const AUTH_BASE_URL = '/api2'
|
const AUTH_BASE_URL = '/api2'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -26,6 +27,24 @@ export const BusinessProject = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑立案登记
|
||||||
|
export const BusinessEditproject = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('times', data.times)
|
||||||
|
formData.append('responsiblefor', data.responsiblefor)
|
||||||
|
formData.append('charge', data.charge)
|
||||||
|
if (isFile(data.contract)) formData.append('contract', data.contract)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/editproject`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 立案登记类型查询
|
// 立案登记类型查询
|
||||||
export const BusinessProjectquerytype = (type: string) => {
|
export const BusinessProjectquerytype = (type: string) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -60,3 +79,17 @@ export const BusinessProjectdetail = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除立项接口
|
||||||
|
export const BusinessDeleteProject = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/deleteProject`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import { isFile } from "@/utils/auxiliaryFunction";
|
||||||
const AUTH_BASE_URL = '/api2'
|
const AUTH_BASE_URL = '/api2'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -23,6 +24,25 @@ export const BusinessWarehousing = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑入库登记
|
||||||
|
export const BusinessEditWarehousing = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('unit', data.unit)
|
||||||
|
formData.append('mark', data.mark)
|
||||||
|
formData.append('lawyer', data.lawyer)
|
||||||
|
formData.append('deadline', data.deadline)
|
||||||
|
if (isFile(data.contract)) formData.append('contract', data.contract)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/editWarehousing`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 入库登记 展示
|
// 入库登记 展示
|
||||||
export const BusinessWarehousingdetail = (data: any) => {
|
export const BusinessWarehousingdetail = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -42,3 +62,17 @@ export const BusinessWarehousingdetail = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除入库登记
|
||||||
|
export const BusinessDeleteWarehousing = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/deleteWarehousing`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -27,6 +27,29 @@ export const FinanceIssueInvoice = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑开票申请
|
||||||
|
export const FinanceEditInvoice = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('ContractNo', data.ContractNo)
|
||||||
|
formData.append('personincharge', data.personincharge)
|
||||||
|
formData.append('amount', data.amount)
|
||||||
|
formData.append('type', data.type)
|
||||||
|
formData.append('unit', data.unit)
|
||||||
|
formData.append('number', data.number)
|
||||||
|
formData.append('address_telephone', data.address_telephone)
|
||||||
|
formData.append('bank', data.bank)
|
||||||
|
formData.append('username', data.username)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/editInvoice`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 开票分页查询
|
// 开票分页查询
|
||||||
export const FinanceIssueDetail = (data: any) => {
|
export const FinanceIssueDetail = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -46,3 +69,17 @@ export const FinanceIssueDetail = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除开票申请
|
||||||
|
export const FinanceDeleteInvoice = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/deleteInvoice`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -24,6 +24,26 @@ export const BusinessSchedule = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑日程
|
||||||
|
export const BusinessEditSchedule = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('title', data.title)
|
||||||
|
if (data.tiems && data.tiems.length) {
|
||||||
|
formData.append('tiems', data.tiems[0])
|
||||||
|
formData.append('end_time', data.tiems[1])
|
||||||
|
}
|
||||||
|
formData.append('remark', data.remark)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/editSchedule`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 日程展示
|
// 日程展示
|
||||||
export const BusinessScheduleDetail = (data: any) => {
|
export const BusinessScheduleDetail = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
|
|||||||
@@ -26,6 +26,27 @@ export const FinancePaymentRequest = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑付款申请
|
||||||
|
export const FinanceEditPayment = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('reason', data.reason)
|
||||||
|
formData.append('amount', data.amount)
|
||||||
|
formData.append('times', data.times)
|
||||||
|
formData.append('payee', data.payee)
|
||||||
|
formData.append('bankcard', data.bankcard)
|
||||||
|
formData.append('BankName', data.BankName)
|
||||||
|
formData.append('applicant', data.applicant)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/editPayment`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 付款申请展示
|
// 付款申请展示
|
||||||
export const FinancePaymentDisplay = (data: any) => {
|
export const FinancePaymentDisplay = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -45,3 +66,17 @@ export const FinancePaymentDisplay = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除付款申请
|
||||||
|
export const FinanceDeletePayment = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/deletePayment`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ export const UserCreateUser = (data: any) => {
|
|||||||
formData.append('password', data.password)
|
formData.append('password', data.password)
|
||||||
formData.append('nation', data.nation)
|
formData.append('nation', data.nation)
|
||||||
formData.append('IdCard', data.IdCard)
|
formData.append('IdCard', data.IdCard)
|
||||||
formData.append('department', data.department)
|
formData.append('department', JSON.stringify(data.department))
|
||||||
|
formData.append('role', JSON.stringify(data.role))
|
||||||
formData.append('mobilePhone', data.mobilePhone)
|
formData.append('mobilePhone', data.mobilePhone)
|
||||||
formData.append('position', data.position)
|
formData.append('position', data.position)
|
||||||
formData.append('team', data.team)
|
formData.append('team', data.team)
|
||||||
|
|||||||
@@ -25,7 +25,28 @@ export const BusinessRegister = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 审批分页接口
|
// 编辑预立案
|
||||||
|
export const BusinessEditRegistration = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('times', data.times)
|
||||||
|
formData.append('client_username', data.client_username)
|
||||||
|
formData.append('client_card', data.client_card)
|
||||||
|
formData.append('party_username', data.party_username)
|
||||||
|
formData.append('party_card', data.party_card)
|
||||||
|
formData.append('description', data.description)
|
||||||
|
formData.append('Undertaker', data.Undertaker)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/editRegistration`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 预立案登记展示
|
||||||
export const BusinessRegisterdetail = (data: any) => {
|
export const BusinessRegisterdetail = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('page', data.pageNum)
|
formData.append('page', data.pageNum)
|
||||||
@@ -60,3 +81,17 @@ export const BusinessPreFilingLinkedCases = () => {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除预立案登记接口
|
||||||
|
export const BusinessDeleteRegistration = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/deleteRegistration`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -24,6 +24,25 @@ export const FinanceReimbursement = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑报销申请
|
||||||
|
export const FinanceEditReimbursement = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('person', data.person)
|
||||||
|
formData.append('times', data.times)
|
||||||
|
formData.append('reason', data.reason)
|
||||||
|
formData.append('amount', data.amount)
|
||||||
|
formData.append('FeeDescription', data.FeeDescription)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/editReimbursement`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 报销展示
|
// 报销展示
|
||||||
export const FinanceReidetail = (data: any) => {
|
export const FinanceReidetail = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -43,3 +62,17 @@ export const FinanceReidetail = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除报销申请
|
||||||
|
export const FinanceDeleteReimbursement = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/deleteReimbursement`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -24,6 +24,25 @@ export const FinanceConfirm = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑收入确认
|
||||||
|
export const FinanceEditIncome = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('times', data.times)
|
||||||
|
formData.append('ContractNo', data.ContractNo)
|
||||||
|
formData.append('CustomerID', data.CustomerID)
|
||||||
|
formData.append('amount', data.amount)
|
||||||
|
formData.append('allocate', data.allocate)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/editIncome`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 收入确认展示
|
// 收入确认展示
|
||||||
export const FinanceConfirmdisplay = (data: any) => {
|
export const FinanceConfirmdisplay = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -43,3 +62,17 @@ export const FinanceConfirmdisplay = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除收入确认
|
||||||
|
export const FinanceDeleteIncome = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/deleteIncome`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export const BusinessDeleteRole = (id: string) => {
|
|||||||
export const BusinessModifypermissions = (data: any) => {
|
export const BusinessModifypermissions = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('id', data.id)
|
formData.append('id', data.id)
|
||||||
formData.append('permissionId', data.permissionId)
|
formData.append('permissionId', JSON.stringify(data.permissionId))
|
||||||
return request({
|
return request({
|
||||||
url: `${AUTH_BASE_URL}/business/modifypermissions`,
|
url: `${AUTH_BASE_URL}/business/modifypermissions`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -79,3 +79,17 @@ export const BusinessModifypermissions = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据角色查询权限
|
||||||
|
export const BusinessGetRolePermissions = (roleId: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('roleId', roleId)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/business/getRolePermissions`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -22,6 +22,23 @@ export const FinanceChange = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 编辑工资/奖金变更
|
||||||
|
export const FinanceEditBonusChange = (data: any) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', data.id)
|
||||||
|
formData.append('username', data.username)
|
||||||
|
formData.append('type', data.type)
|
||||||
|
formData.append('Instructions', data.Instructions)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/editBonusChange`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 工资/奖金变更展示
|
// 工资/奖金变更展示
|
||||||
export const FinanceChangeDetail = (data: any) => {
|
export const FinanceChangeDetail = (data: any) => {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
@@ -41,3 +58,17 @@ export const FinanceChangeDetail = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除工资/奖金变更
|
||||||
|
export const FinanceDeleteBonusChange = (id: string) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('id', id)
|
||||||
|
return request({
|
||||||
|
url: `${AUTH_BASE_URL}/finance/deleteBonusChange`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -127,15 +127,36 @@ export function convertFilePathsToObject(filePaths: string | string[]): Array<{
|
|||||||
// 安全的文件信息提取函数
|
// 安全的文件信息提取函数
|
||||||
export function getFileInfo(fileStr: string): { url: string; name: string } | null {
|
export function getFileInfo(fileStr: string): { url: string; name: string } | null {
|
||||||
try {
|
try {
|
||||||
if (!fileStr || !isValidJson(fileStr)) return null
|
if (!fileStr) return null
|
||||||
const files = convertFilePathsToObject(JSON.parse(fileStr))
|
|
||||||
return files && files.length > 0 ? files[0] : null
|
// 如果是有效的JSON字符串,按原有逻辑处理
|
||||||
|
if (isValidJson(fileStr)) {
|
||||||
|
const parsed = JSON.parse(fileStr)
|
||||||
|
const files = convertFilePathsToObject(parsed)
|
||||||
|
return files && files.length > 0 ? { url: files[0].url, name: files[0].name } : null
|
||||||
|
}
|
||||||
|
// 如果是URL字符串,直接使用 convertFilePathsToObject 处理
|
||||||
|
else if (typeof fileStr === 'string') {
|
||||||
|
const files = convertFilePathsToObject(fileStr)
|
||||||
|
return files && files.length > 0 ? { url: files[0].url, name: files[0].name } : null
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('解析文件信息失败:', e)
|
console.error('解析文件信息失败:', e)
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function deepCloneByJSON(obj: any) {
|
||||||
|
try {
|
||||||
|
return JSON.parse(JSON.stringify(obj))
|
||||||
|
} catch (error) {
|
||||||
|
console.error('深拷贝失败:', error)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function isString(value: any): boolean {
|
export function isString(value: any): boolean {
|
||||||
return typeof value === 'string'
|
return typeof value === 'string'
|
||||||
}
|
}
|
||||||
@@ -151,3 +172,36 @@ export function isValidJson(str: string): boolean {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isValidFormat(data: any): boolean {
|
||||||
|
let parsedData = data
|
||||||
|
|
||||||
|
// 如果输入是字符串,尝试解析为 JSON
|
||||||
|
if (typeof data === 'string') {
|
||||||
|
try {
|
||||||
|
parsedData = JSON.parse(data)
|
||||||
|
} catch (e) {
|
||||||
|
return false // JSON 解析失败,直接返回 false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否为数组
|
||||||
|
if (!Array.isArray(parsedData)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查数组中的每个元素
|
||||||
|
return parsedData.every((item) => {
|
||||||
|
// 检查是否为对象且不为 null
|
||||||
|
if (typeof item !== 'object' || item === null) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查必需的属性是否存在,且类型是否正确
|
||||||
|
const hasIndex = typeof item.index === 'number'
|
||||||
|
const hasName = typeof item.name === 'string'
|
||||||
|
const hasIdNumber = typeof item.idNumber === 'string'
|
||||||
|
|
||||||
|
return hasIndex && hasName && hasIdNumber
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ httpRequest.interceptors.response.use(
|
|||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
|
|
||||||
const { code, msg } = response.data as ApiResponse
|
const { code, message } = response.data as any
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case ApiCodeEnum.ACCESS_TOKEN_INVALID:
|
case ApiCodeEnum.ACCESS_TOKEN_INVALID:
|
||||||
@@ -91,17 +91,17 @@ httpRequest.interceptors.response.use(
|
|||||||
} else {
|
} else {
|
||||||
// 未启用token刷新,直接跳转登录页
|
// 未启用token刷新,直接跳转登录页
|
||||||
await redirectToLogin('登录已过期,请重新登录')
|
await redirectToLogin('登录已过期,请重新登录')
|
||||||
return Promise.reject(new Error(msg || 'Access Token Invalid'))
|
return Promise.reject(new Error(message || 'Access Token Invalid'))
|
||||||
}
|
}
|
||||||
|
|
||||||
case ApiCodeEnum.REFRESH_TOKEN_INVALID:
|
case ApiCodeEnum.REFRESH_TOKEN_INVALID:
|
||||||
// Refresh Token 过期,跳转登录页
|
// Refresh Token 过期,跳转登录页
|
||||||
await redirectToLogin('登录已过期,请重新登录')
|
await redirectToLogin('登录已过期,请重新登录')
|
||||||
return Promise.reject(new Error(msg || 'Refresh Token Invalid'))
|
return Promise.reject(new Error(message || 'Refresh Token Invalid'))
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ElMessage.error(msg || '请求失败')
|
ElMessage.error(message || '请求失败')
|
||||||
return Promise.reject(new Error(msg || 'Request Error'))
|
return Promise.reject(new Error(message || 'Request Error'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -32,14 +32,6 @@
|
|||||||
<div class="data-table__toolbar">
|
<div class="data-table__toolbar">
|
||||||
<div class="data-table__toolbar--actions">
|
<div class="data-table__toolbar--actions">
|
||||||
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
:disabled="ids.length === 0"
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete()"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -64,7 +56,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleOpenDialog(scope.row.id)"
|
@click="handleOpenDialog(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -118,7 +110,7 @@
|
|||||||
<el-form-item label="情况" prop="situation">
|
<el-form-item label="情况" prop="situation">
|
||||||
<el-input v-model="formData.situation" placeholder="请输入情况" />
|
<el-input v-model="formData.situation" placeholder="请输入情况" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="代办审核人" prop="personincharge">
|
<el-form-item v-if="!formData?.id" label="代办审核人" prop="personincharge">
|
||||||
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in personinchargeList"
|
v-for="item in personinchargeList"
|
||||||
@@ -206,9 +198,14 @@ import { useAppStore } from '@/store/modules/app-store'
|
|||||||
import { DeviceEnum } from '@/enums/settings/device-enum'
|
import { DeviceEnum } from '@/enums/settings/device-enum'
|
||||||
|
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserDeleteDepartment } from '@/api/calibration/department'
|
import {
|
||||||
import { FinanceLoan, FinanceLoandisplay } from '@/api/calibration/accountAdjustmentApplication'
|
FinanceDeleteAccounts,
|
||||||
|
FinanceEditAccounts,
|
||||||
|
FinanceLoan,
|
||||||
|
FinanceLoandisplay
|
||||||
|
} from '@/api/calibration/accountAdjustmentApplication'
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
|
import { deepCloneByJSON } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Role',
|
name: 'Role',
|
||||||
@@ -248,6 +245,7 @@ const drawerSize = computed(() => (appStore.device === DeviceEnum.DESKTOP ? '600
|
|||||||
|
|
||||||
// 角色表单
|
// 角色表单
|
||||||
const formData = reactive<any>({
|
const formData = reactive<any>({
|
||||||
|
id: '',
|
||||||
times: '',
|
times: '',
|
||||||
ContractNo: '',
|
ContractNo: '',
|
||||||
CustomerID: '',
|
CustomerID: '',
|
||||||
@@ -310,15 +308,17 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开角色弹窗
|
// 打开角色弹窗
|
||||||
function handleOpenDialog(roleId?: string) {
|
function handleOpenDialog(data: any = null) {
|
||||||
dialog.visible = true
|
dialog.visible = true
|
||||||
if (roleId) {
|
if (data) {
|
||||||
dialog.title = '修改角色'
|
dialog.title = '修改调帐申请'
|
||||||
RoleAPI.getFormData(roleId).then((data) => {
|
if (data && Object.keys(data).length > 0) {
|
||||||
Object.assign(formData, data)
|
const data1 = deepCloneByJSON(data)
|
||||||
})
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dialog.title = '新增角色'
|
dialog.title = '新增调帐申请'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ function handleSubmit() {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = formData.id
|
const roleId = formData.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
RoleAPI.update(roleId, formData)
|
FinanceEditAccounts(formData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
handleCloseDialog()
|
handleCloseDialog()
|
||||||
@@ -369,7 +369,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
UserDeleteDepartment(id)
|
FinanceDeleteAccounts(id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
@@ -381,58 +381,6 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// 删除角色
|
|
||||||
function handleDelete(roleId?: number) {
|
|
||||||
const roleIds = [roleId || ids.value].join(',')
|
|
||||||
if (!roleIds) {
|
|
||||||
ElMessage.warning('请勾选删除项')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(
|
|
||||||
() => {
|
|
||||||
loading.value = true
|
|
||||||
RoleAPI.deleteByIds(roleIds)
|
|
||||||
.then(() => {
|
|
||||||
ElMessage.success('删除成功')
|
|
||||||
handleResetQuery()
|
|
||||||
})
|
|
||||||
.finally(() => (loading.value = false))
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
ElMessage.info('已取消删除')
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 打开分配菜单权限弹窗
|
|
||||||
// async function handleOpenAssignPermDialog(row: RolePageVO) {
|
|
||||||
// const roleId = row.id;
|
|
||||||
// if (roleId) {
|
|
||||||
// assignPermDialogVisible.value = true;
|
|
||||||
// loading.value = true;
|
|
||||||
//
|
|
||||||
// checkedRole.value.id = roleId;
|
|
||||||
// checkedRole.value.name = row.name;
|
|
||||||
//
|
|
||||||
// // 获取所有的菜单
|
|
||||||
// menuPermOptions.value = await MenuAPI.getOptions();
|
|
||||||
//
|
|
||||||
// // 回显角色已拥有的菜单
|
|
||||||
// RoleAPI.getRoleMenuIds(roleId)
|
|
||||||
// .then((data) => {
|
|
||||||
// const checkedMenuIds = data;
|
|
||||||
// checkedMenuIds.forEach((menuId) => permTreeRef.value!.setChecked(menuId, true, false));
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// loading.value = false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 分配菜单权限提交
|
// 分配菜单权限提交
|
||||||
function handleAssignPermSubmit() {
|
function handleAssignPermSubmit() {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<el-button v-else size="small" type="primary">点击选择文件</el-button>
|
<el-button v-else size="small" type="primary">点击选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="代办负责人" prop="personincharge">
|
<el-form-item v-if="!newData?.id" label="代办负责人" prop="personincharge">
|
||||||
<el-select v-model="formData.personincharge" placeholder="请选择">
|
<el-select v-model="formData.personincharge" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in PersoninchargeList"
|
v-for="item in PersoninchargeList"
|
||||||
@@ -69,6 +69,14 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { deepCloneByJSON, getFileInfo } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
newData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
// 表单数据
|
// 表单数据
|
||||||
@@ -144,12 +152,22 @@ const DepartmentList = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
DepartmentList()
|
DepartmentList()
|
||||||
|
setFormData(props.newData)
|
||||||
})
|
})
|
||||||
|
|
||||||
const getForm = () => {
|
const getForm = () => {
|
||||||
return formData
|
return formData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setFormData = (data: any) => {
|
||||||
|
if (data && Object.keys(data).length > 0) {
|
||||||
|
const data1 = deepCloneByJSON(data)
|
||||||
|
data1.file = getFileInfo(data1.file)
|
||||||
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const submit = (): Promise<boolean> => {
|
const submit = (): Promise<boolean> => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
formRef.value?.validate((valid: boolean) => {
|
formRef.value?.validate((valid: boolean) => {
|
||||||
|
|||||||
@@ -59,11 +59,7 @@
|
|||||||
<el-table-column label="盖着类型" prop="seal_type" />
|
<el-table-column label="盖着类型" prop="seal_type" />
|
||||||
<el-table-column label="用印文件" prop="file">
|
<el-table-column label="用印文件" prop="file">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-link
|
<el-link v-if="row.file" :href="getFileInfo(row.file)?.url" target="_blank">
|
||||||
v-if="row.file && isValidJson(row.file)"
|
|
||||||
:href="getFileInfo(row.file)?.url"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
{{ getFileInfo(row.file)?.name }}
|
{{ getFileInfo(row.file)?.name }}
|
||||||
</el-link>
|
</el-link>
|
||||||
<span v-else>无</span>
|
<span v-else>无</span>
|
||||||
@@ -78,7 +74,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleOpenDialog(scope.row.id)"
|
@click="handleOpenDialog(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -108,15 +104,16 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserDeleteDepartment } from '@/api/calibration/department'
|
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
import { functionDialogBox } from '@/utils/functionDialogBox'
|
import { functionDialogBox } from '@/utils/functionDialogBox'
|
||||||
import StampingForm from './components/StampingForm.vue'
|
import StampingForm from './components/StampingForm.vue'
|
||||||
|
|
||||||
import { getFileInfo, isValidJson } from '@/utils/auxiliaryFunction'
|
import { getFileInfo } from '@/utils/auxiliaryFunction'
|
||||||
import {
|
import {
|
||||||
BusinessApplication,
|
BusinessApplication,
|
||||||
BusinessApplicationdetail
|
BusinessApplicationdetail,
|
||||||
|
BusinessDeleteApplication,
|
||||||
|
BusinessEditApplication
|
||||||
} from '@/api/calibration/applicationForSealApproval'
|
} from '@/api/calibration/applicationForSealApproval'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -179,21 +176,20 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开角色弹窗
|
// 打开角色弹窗
|
||||||
function handleOpenDialog(roleId?: string) {
|
function handleOpenDialog(data: any = null) {
|
||||||
dialog.visible = true
|
dialog.visible = true
|
||||||
if (roleId) {
|
if (data) {
|
||||||
functionDialogBox(
|
functionDialogBox(
|
||||||
StampingForm,
|
StampingForm,
|
||||||
{},
|
{
|
||||||
|
newData: data
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '编辑申请用印',
|
title: '编辑申请用印',
|
||||||
width: '900',
|
width: '900',
|
||||||
ok(value: any) {
|
ok(value: any) {
|
||||||
console.log('value', value)
|
handleSubmit({ id: data.id, ...value })
|
||||||
}
|
}
|
||||||
// cancel() {
|
|
||||||
// console.log("value");
|
|
||||||
// },
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
@@ -216,13 +212,12 @@ function handleSubmit(data: any) {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = data.id
|
const roleId = data.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
// RoleAPI.update(roleId, formData)
|
BusinessEditApplication(data)
|
||||||
// .then(() => {
|
.then(() => {
|
||||||
// ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
// handleCloseDialog()
|
handleResetQuery()
|
||||||
// handleResetQuery()
|
})
|
||||||
// })
|
.finally(() => (loading.value = false))
|
||||||
// .finally(() => (loading.value = false))
|
|
||||||
} else {
|
} else {
|
||||||
BusinessApplication(data)
|
BusinessApplication(data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -241,7 +236,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
UserDeleteDepartment(id)
|
BusinessDeleteApplication(id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
label-width="auto"
|
label-width="auto"
|
||||||
label-position="top"
|
label-position="top"
|
||||||
>
|
>
|
||||||
<el-form-item label="预立案" prop="user_id">
|
<el-form-item v-if="!newData?.id" label="预立案" prop="user_id">
|
||||||
<el-select v-model="formData.user_id" placeholder="请选择预立案">
|
<el-select v-model="formData.user_id" placeholder="请选择预立案">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in userIdList"
|
v-for="(item, index) in userIdList"
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<el-button v-else size="small" type="primary">点击选择文件</el-button>
|
<el-button v-else size="small" type="primary">点击选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="代办负责人" prop="personincharge">
|
<el-form-item v-if="!newData?.id" label="代办负责人" prop="personincharge">
|
||||||
<el-select v-model="formData.personincharge" placeholder="请选择代办负责人">
|
<el-select v-model="formData.personincharge" placeholder="请选择代办负责人">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in UndertakerList"
|
v-for="item in UndertakerList"
|
||||||
@@ -125,6 +125,14 @@ import { Plus } from '@element-plus/icons-vue'
|
|||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { BusinessRegistrationlist } from '@/api/calibration/preRegistration'
|
import { BusinessRegistrationlist } from '@/api/calibration/preRegistration'
|
||||||
|
import { deepCloneByJSON, getFileInfo, isValidFormat } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
newData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
// 表单数据
|
// 表单数据
|
||||||
@@ -221,12 +229,26 @@ const onBusinessRegistrationlist = () => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
onBusinessRegistrationlist()
|
onBusinessRegistrationlist()
|
||||||
DepartmentList()
|
DepartmentList()
|
||||||
|
setFormData(props.newData)
|
||||||
})
|
})
|
||||||
|
|
||||||
const getForm = () => {
|
const getForm = () => {
|
||||||
return formData
|
return formData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setFormData = (data: any) => {
|
||||||
|
if (data && Object.keys(data).length > 0) {
|
||||||
|
const data1 = deepCloneByJSON(data)
|
||||||
|
if (isValidFormat(data1.BiddingUnit)) {
|
||||||
|
data1.BiddingUnit = JSON.parse(data1.BiddingUnit)
|
||||||
|
} else {
|
||||||
|
data1.BiddingUnit = []
|
||||||
|
}
|
||||||
|
data1.BiddingAnnouncement = getFileInfo(data1.BiddingAnnouncement)
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const submit = (): Promise<boolean> => {
|
const submit = (): Promise<boolean> => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
formRef.value?.validate((valid: boolean) => {
|
formRef.value?.validate((valid: boolean) => {
|
||||||
@@ -254,7 +276,6 @@ defineExpose({
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.pre-registration-form {
|
.pre-registration-form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 600px;
|
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
label-width="auto"
|
label-width="auto"
|
||||||
label-position="top"
|
label-position="top"
|
||||||
>
|
>
|
||||||
<el-form-item label="预立案" prop="user_id">
|
<el-form-item v-if="!data?.user_id" label="预立案" prop="user_id">
|
||||||
<el-select v-model="formData.user_id" placeholder="请选择预立案">
|
<el-select v-model="formData.user_id" placeholder="请选择预立案">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in userIdList"
|
v-for="(item, index) in userIdList"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目类型" prop="type">
|
<el-form-item v-if="!data?.user_id" label="项目类型" prop="type">
|
||||||
<el-select v-model="formData.type" placeholder="请选择项目类型" @change="typeChange">
|
<el-select v-model="formData.type" placeholder="请选择项目类型" @change="typeChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in typeList"
|
v-for="(item, index) in typeList"
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="合同编号" prop="ContractNo">
|
<el-form-item v-if="!data?.user_id" label="合同编号" prop="ContractNo">
|
||||||
<el-input v-model="formData.ContractNo" disabled placeholder="选择项目类型生成" />
|
<el-input v-model="formData.ContractNo" disabled placeholder="选择项目类型生成" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="立项日期时间" prop="times">
|
<el-form-item label="立项日期时间" prop="times">
|
||||||
@@ -57,15 +57,6 @@
|
|||||||
<el-form-item label="收费情况" prop="charge">
|
<el-form-item label="收费情况" prop="charge">
|
||||||
<el-input v-model="formData.charge" placeholder="请输入" />
|
<el-input v-model="formData.charge" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述" prop="description">
|
|
||||||
<el-input
|
|
||||||
v-model="formData.description"
|
|
||||||
type="textarea"
|
|
||||||
placeholder="描述"
|
|
||||||
:rows="4"
|
|
||||||
style="width: 100%"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="合同" prop="contract">
|
<el-form-item label="合同" prop="contract">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="avatar-uploader"
|
class="avatar-uploader"
|
||||||
@@ -76,7 +67,7 @@
|
|||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
>
|
>
|
||||||
<div v-if="formData.contract" class="upload-preview">
|
<div v-if="formData.contract" class="upload-preview">
|
||||||
<span>{{ formData.contract.name }}</span>
|
<span>{{ formData.contract?.name }}</span>
|
||||||
<el-button type="danger" size="small" @click.stop="removeFile('contract')">
|
<el-button type="danger" size="small" @click.stop="removeFile('contract')">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -84,6 +75,16 @@
|
|||||||
<el-button v-else size="small" type="primary">点击选择文件</el-button>
|
<el-button v-else size="small" type="primary">点击选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="!data?.user_id" label="代办负责人" prop="personincharge">
|
||||||
|
<el-select v-model="formData.personincharge" placeholder="请选择代办负责人">
|
||||||
|
<el-option
|
||||||
|
v-for="item in UndertakerList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.username"
|
||||||
|
:value="item.username"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -93,6 +94,7 @@ import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { BusinessProjectquerytype } from '@/api/calibration/conflictOfInterestSearch'
|
import { BusinessProjectquerytype } from '@/api/calibration/conflictOfInterestSearch'
|
||||||
import { BusinessRegistrationlist } from '@/api/calibration/preRegistration'
|
import { BusinessRegistrationlist } from '@/api/calibration/preRegistration'
|
||||||
|
import { deepCloneByJSON, getFileInfo } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
@@ -131,7 +133,6 @@ const formRules = reactive<any>({
|
|||||||
type: [{ required: true, message: '请选择预立案日期', trigger: 'change' }],
|
type: [{ required: true, message: '请选择预立案日期', trigger: 'change' }],
|
||||||
ContractNo: [{ required: true, message: '请输入', trigger: 'change' }],
|
ContractNo: [{ required: true, message: '请输入', trigger: 'change' }],
|
||||||
times: [{ required: true, message: '请选择预立案日期', trigger: 'change' }],
|
times: [{ required: true, message: '请选择预立案日期', trigger: 'change' }],
|
||||||
description: [{ required: true, message: '请填写项目简述/案由', trigger: 'blur' }],
|
|
||||||
responsiblefor: [{ required: true, message: '请选择负责人', trigger: 'change' }],
|
responsiblefor: [{ required: true, message: '请选择负责人', trigger: 'change' }],
|
||||||
charge: [{ required: true, message: '请输入', trigger: 'blur' }],
|
charge: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||||
contract: [{ required: true, message: '请选择合同', trigger: 'blur' }],
|
contract: [{ required: true, message: '请选择合同', trigger: 'blur' }],
|
||||||
@@ -188,43 +189,25 @@ const onBusinessRegistrationlist = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const setFormData = (data: any) => {
|
|
||||||
if (data) {
|
|
||||||
Object.keys(formData).forEach((key) => {
|
|
||||||
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
|
||||||
formData[key as keyof typeof formData] = data[key]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
onBusinessRegistrationlist()
|
onBusinessRegistrationlist()
|
||||||
DepartmentList()
|
DepartmentList()
|
||||||
console.log(props.data)
|
|
||||||
setFormData(props.data)
|
setFormData(props.data)
|
||||||
})
|
})
|
||||||
|
|
||||||
// watch(
|
|
||||||
// () => props.data,
|
|
||||||
// (newValue) => {
|
|
||||||
// // type: '',
|
|
||||||
// // ContractNo: '',
|
|
||||||
// // times: '',
|
|
||||||
// // responsiblefor: '',
|
|
||||||
// // charge: '',
|
|
||||||
// // contract: undefined,
|
|
||||||
// // personincharge: '',
|
|
||||||
// // user_id: ''
|
|
||||||
// console.log(newValue)
|
|
||||||
// },
|
|
||||||
// { immediate: true }
|
|
||||||
// )
|
|
||||||
|
|
||||||
const getForm = () => {
|
const getForm = () => {
|
||||||
return formData
|
return formData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setFormData = (data: any) => {
|
||||||
|
if (data && Object.keys(data).length > 0) {
|
||||||
|
const data1 = deepCloneByJSON(data)
|
||||||
|
data1.contract = getFileInfo(data1.contract)
|
||||||
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const submit = (): Promise<boolean> => {
|
const submit = (): Promise<boolean> => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
formRef.value?.validate((valid: boolean) => {
|
formRef.value?.validate((valid: boolean) => {
|
||||||
@@ -246,7 +229,6 @@ defineExpose({
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.pre-registration-form {
|
.pre-registration-form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 600px;
|
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|||||||
@@ -44,32 +44,40 @@
|
|||||||
<el-table-column label="委托人信息" align="center" prop="client_username">
|
<el-table-column label="委托人信息" align="center" prop="client_username">
|
||||||
<el-table-column v-slot="{ row }" prop="client_username" label="自然人姓名/法人名称">
|
<el-table-column v-slot="{ row }" prop="client_username" label="自然人姓名/法人名称">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.client_username)
|
isValidFormat(row.client_username)
|
||||||
.map((item: any) => item.name)
|
? JSON.parse(row.client_username)
|
||||||
.join(',')
|
.map((item: any) => item.name)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-slot="{ row }" prop="client_username" label="身份证号码/统一代码">
|
<el-table-column v-slot="{ row }" prop="client_username" label="身份证号码/统一代码">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.client_username)
|
isValidFormat(row.client_username)
|
||||||
.map((item: any) => item.idNumber)
|
? JSON.parse(row.client_username)
|
||||||
.join(',')
|
.map((item: any) => item.idNumber)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="相对方信息" align="center" prop="party_username">
|
<el-table-column label="相对方信息" align="center" prop="party_username">
|
||||||
<el-table-column v-slot="{ row }" prop="party_username" label="自然人姓名/法人名称">
|
<el-table-column v-slot="{ row }" prop="party_username" label="自然人姓名/法人名称">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.party_username)
|
isValidFormat(row.party_username)
|
||||||
.map((item: any) => item.name)
|
? JSON.parse(row.party_username)
|
||||||
.join(',')
|
.map((item: any) => item.name)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-slot="{ row }" prop="party_username" label="身份证号码/统一代码">
|
<el-table-column v-slot="{ row }" prop="party_username" label="身份证号码/统一代码">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.party_username)
|
isValidFormat(row.party_username)
|
||||||
.map((item: any) => item.idNumber)
|
? JSON.parse(row.party_username)
|
||||||
.join(',')
|
.map((item: any) => item.idNumber)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -79,11 +87,7 @@
|
|||||||
<el-table-column label="收费情况" align="center" prop="charge" />
|
<el-table-column label="收费情况" align="center" prop="charge" />
|
||||||
<el-table-column label="合同" align="center" prop="contract">
|
<el-table-column label="合同" align="center" prop="contract">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-link
|
<el-link v-if="row.contract" :href="getFileInfo(row.contract)?.url" target="_blank">
|
||||||
v-if="row.contract && isValidJson(row.contract)"
|
|
||||||
:href="getFileInfo(row.contract)?.url"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
{{ getFileInfo(row.contract)?.name }}
|
{{ getFileInfo(row.contract)?.name }}
|
||||||
</el-link>
|
</el-link>
|
||||||
<span v-else>无</span>
|
<span v-else>无</span>
|
||||||
@@ -101,6 +105,15 @@
|
|||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
link
|
||||||
|
icon="delete"
|
||||||
|
@click="onUserDeleteDepartment(scope.row.id)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -130,53 +143,76 @@
|
|||||||
<el-table-column label="委托人信息" align="center" prop="client_username">
|
<el-table-column label="委托人信息" align="center" prop="client_username">
|
||||||
<el-table-column v-slot="{ row }" prop="client_username" label="自然人姓名/法人名称">
|
<el-table-column v-slot="{ row }" prop="client_username" label="自然人姓名/法人名称">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.client_username)
|
isValidFormat(row.client_username)
|
||||||
.map((item: any) => item.name)
|
? JSON.parse(row.client_username)
|
||||||
.join(',')
|
.map((item: any) => item.name)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-slot="{ row }" prop="client_username" label="身份证号码/统一代码">
|
<el-table-column v-slot="{ row }" prop="client_username" label="身份证号码/统一代码">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.client_username)
|
isValidFormat(row.client_username)
|
||||||
.map((item: any) => item.idNumber)
|
? JSON.parse(row.client_username)
|
||||||
.join(',')
|
.map((item: any) => item.idNumber)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="相对方信息" align="center" prop="party_username">
|
<el-table-column label="相对方信息" align="center" prop="party_username">
|
||||||
<el-table-column v-slot="{ row }" prop="party_username" label="自然人姓名/法人名称">
|
<el-table-column v-slot="{ row }" prop="party_username" label="自然人姓名/法人名称">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.party_username)
|
isValidFormat(row.party_username)
|
||||||
.map((item: any) => item.name)
|
? JSON.parse(row.party_username)
|
||||||
.join(',')
|
.map((item: any) => item.name)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-slot="{ row }" prop="party_username" label="身份证号码/统一代码">
|
<el-table-column v-slot="{ row }" prop="party_username" label="身份证号码/统一代码">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.party_username)
|
isValidFormat(row.party_username)
|
||||||
.map((item: any) => item.idNumber)
|
? JSON.parse(row.party_username)
|
||||||
.join(',')
|
.map((item: any) => item.idNumber)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="招标单位信息" align="center" prop="BiddingUnit">
|
<el-table-column label="招标单位信息" align="center" prop="BiddingUnit">
|
||||||
<el-table-column v-slot="{ row }" prop="BiddingUnit" label="自然人姓名/法人名称">
|
<el-table-column v-slot="{ row }" prop="BiddingUnit" label="自然人姓名/法人名称">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.BiddingUnit)
|
isValidFormat(row.BiddingUnit)
|
||||||
.map((item: any) => item.name)
|
? JSON.parse(row.BiddingUnit)
|
||||||
.join(',')
|
.map((item: any) => item.name)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-slot="{ row }" prop="BiddingUnit" label="身份证号码/统一代码">
|
<el-table-column v-slot="{ row }" prop="BiddingUnit" label="身份证号码/统一代码">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.BiddingUnit)
|
isValidFormat(row.BiddingUnit)
|
||||||
.map((item: any) => item.idNumber)
|
? JSON.parse(row.BiddingUnit)
|
||||||
.join(',')
|
.map((item: any) => item.idNumber)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="项目名称" align="center" prop="ProjectName" />
|
<el-table-column label="项目名称" align="center" prop="ProjectName" />
|
||||||
<el-table-column label="上传招标公告" align="center" prop="BiddingAnnouncement" />
|
<el-table-column label="上传招标公告" align="center" prop="BiddingAnnouncement">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-link
|
||||||
|
v-if="row.BiddingAnnouncement"
|
||||||
|
:href="getFileInfo(row.BiddingAnnouncement)?.url"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{{ getFileInfo(row.BiddingAnnouncement)?.name }}
|
||||||
|
</el-link>
|
||||||
|
<span v-else>无</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="申请日期" align="center" prop="times" />
|
<el-table-column label="申请日期" align="center" prop="times" />
|
||||||
<el-table-column label="操作" align="center" width="220">
|
<el-table-column label="操作" align="center" width="220">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -185,10 +221,19 @@
|
|||||||
icon="edit"
|
icon="edit"
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
@click="handleResetPassword(scope.row)"
|
@click="handleOpenDialog2(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
link
|
||||||
|
icon="delete"
|
||||||
|
@click="onUserDeleteDepartment2(scope.row.id)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -213,17 +258,25 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
|||||||
|
|
||||||
// ==================== 3. 类型定义 ====================
|
// ==================== 3. 类型定义 ====================
|
||||||
import type { UserPageVO } from '@/api/system/user-api'
|
import type { UserPageVO } from '@/api/system/user-api'
|
||||||
// ==================== 4. API 服务 ====================
|
|
||||||
import UserAPI from '@/api/system/user-api'
|
|
||||||
|
|
||||||
// ==================== 7. Composables ====================
|
// ==================== 7. Composables ====================
|
||||||
import { useTableSelection } from '@/composables'
|
import { useTableSelection } from '@/composables'
|
||||||
import { functionDialogBox } from '@/utils/functionDialogBox'
|
import { functionDialogBox } from '@/utils/functionDialogBox'
|
||||||
import BusinessProjectForm from './components/BusinessProjectForm.vue'
|
import BusinessProjectForm from './components/BusinessProjectForm.vue'
|
||||||
import { BusinessProject, BusinessProjectdetail } from '@/api/calibration/conflictOfInterestSearch'
|
import {
|
||||||
|
BusinessDeleteProject,
|
||||||
|
BusinessEditproject,
|
||||||
|
BusinessProject,
|
||||||
|
BusinessProjectdetail
|
||||||
|
} from '@/api/calibration/conflictOfInterestSearch'
|
||||||
import BidRegistrationForm from './components/BidRegistrationForm.vue'
|
import BidRegistrationForm from './components/BidRegistrationForm.vue'
|
||||||
import { BusinessBid, BusinessBiddetail } from '@/api/calibration/bidRegistration'
|
import {
|
||||||
import { getFileInfo, isValidJson } from '@/utils/auxiliaryFunction'
|
BusinessBid,
|
||||||
|
BusinessBiddetail,
|
||||||
|
BusinessDeleteBid,
|
||||||
|
BusinessEditBid
|
||||||
|
} from '@/api/calibration/bidRegistration'
|
||||||
|
import { getFileInfo, isValidFormat } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
// ==================== 组件配置 ====================
|
// ==================== 组件配置 ====================
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -298,8 +351,8 @@ const { handleSelectionChange } = useTableSelection<UserPageVO>()
|
|||||||
function handleQuery(biaoshi: string = '1'): Promise<void> {
|
function handleQuery(biaoshi: string = '1'): Promise<void> {
|
||||||
queryParams.pageNum = 1
|
queryParams.pageNum = 1
|
||||||
queryParams2.pageNum = 1
|
queryParams2.pageNum = 1
|
||||||
if (biaoshi == '1' || biaoshi == '2') fetchUserList2()
|
if (biaoshi == '1' || biaoshi == '2') fetchUserList()
|
||||||
if (biaoshi == '1' || biaoshi == '3') fetchUserList()
|
if (biaoshi == '1' || biaoshi == '3') fetchUserList2()
|
||||||
return Promise.resolve()
|
return Promise.resolve()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,31 +365,7 @@ function handleResetQuery(biaoshi: string = '1'): void {
|
|||||||
queryParams.createTime = undefined
|
queryParams.createTime = undefined
|
||||||
handleQuery(biaoshi)
|
handleQuery(biaoshi)
|
||||||
}
|
}
|
||||||
// ==================== 用户操作 ====================
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 重置用户密码
|
|
||||||
* @param row 用户数据
|
|
||||||
*/
|
|
||||||
function handleResetPassword(row: UserPageVO): void {
|
|
||||||
ElMessageBox.prompt(`请输入用户【${row.username}】的新密码`, '重置密码', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
inputPattern: /.{6,}/,
|
|
||||||
inputErrorMessage: '密码至少需要6位字符'
|
|
||||||
})
|
|
||||||
.then(({ value }) => {
|
|
||||||
return UserAPI.resetPassword(row.id, value)
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
ElMessage.success('密码重置成功')
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
if (error !== 'cancel') {
|
|
||||||
ElMessage.error('密码重置失败')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// ==================== 弹窗操作 ====================
|
// ==================== 弹窗操作 ====================
|
||||||
function handleOpenDialog(data: any = null) {
|
function handleOpenDialog(data: any = null) {
|
||||||
if (data) {
|
if (data) {
|
||||||
@@ -349,7 +378,7 @@ function handleOpenDialog(data: any = null) {
|
|||||||
title: '编辑立案登记',
|
title: '编辑立案登记',
|
||||||
width: '900',
|
width: '900',
|
||||||
ok(value: any) {
|
ok(value: any) {
|
||||||
handleSubmit(value)
|
handleSubmit({ id: data.id, ...value })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -367,18 +396,34 @@ function handleOpenDialog(data: any = null) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function handleOpenDialog2(): Promise<void> {
|
function handleOpenDialog2(data: any = null) {
|
||||||
functionDialogBox(
|
if (data) {
|
||||||
BidRegistrationForm,
|
functionDialogBox(
|
||||||
{},
|
BidRegistrationForm,
|
||||||
{
|
{
|
||||||
title: '新增投标登记',
|
newData: data
|
||||||
width: '900',
|
},
|
||||||
ok(value: any) {
|
{
|
||||||
handleSubmit2(value)
|
title: '编辑投标登记',
|
||||||
|
width: '900',
|
||||||
|
ok(value: any) {
|
||||||
|
handleSubmit2({ id: data.id, ...value })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
)
|
} else {
|
||||||
|
functionDialogBox(
|
||||||
|
BidRegistrationForm,
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
title: '新增投标登记',
|
||||||
|
width: '900',
|
||||||
|
ok(value: any) {
|
||||||
|
handleSubmit2(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -390,7 +435,7 @@ const handleSubmit = useDebounceFn(async (data: any) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (userId) {
|
if (userId) {
|
||||||
// await UserAPI.update(userId, formData)
|
await BusinessEditproject(data)
|
||||||
ElMessage.success('修改用户成功')
|
ElMessage.success('修改用户成功')
|
||||||
} else {
|
} else {
|
||||||
await BusinessProject(data)
|
await BusinessProject(data)
|
||||||
@@ -410,7 +455,7 @@ const handleSubmit2 = useDebounceFn(async (data: any) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (userId) {
|
if (userId) {
|
||||||
// await UserAPI.update(userId, formData)
|
await BusinessEditBid({ ...data, BiddingUnit: JSON.stringify(data.BiddingUnit) })
|
||||||
ElMessage.success('修改用户成功')
|
ElMessage.success('修改用户成功')
|
||||||
} else {
|
} else {
|
||||||
await BusinessBid({
|
await BusinessBid({
|
||||||
@@ -428,6 +473,48 @@ const handleSubmit2 = useDebounceFn(async (data: any) => {
|
|||||||
}
|
}
|
||||||
}, 300)
|
}, 300)
|
||||||
|
|
||||||
|
const onUserDeleteDepartment = (id: string) => {
|
||||||
|
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(
|
||||||
|
() => {
|
||||||
|
loading.value = true
|
||||||
|
BusinessDeleteProject(id)
|
||||||
|
.then((res: any) => {
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
handleResetQuery()
|
||||||
|
})
|
||||||
|
.finally(() => (loading.value = false))
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
ElMessage.info('已取消删除')
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const onUserDeleteDepartment2 = (id: string) => {
|
||||||
|
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(
|
||||||
|
() => {
|
||||||
|
loading.value = true
|
||||||
|
BusinessDeleteBid(id)
|
||||||
|
.then((res: any) => {
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
handleResetQuery()
|
||||||
|
})
|
||||||
|
.finally(() => (loading.value = false))
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
ElMessage.info('已取消删除')
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// ==================== 生命周期 ====================
|
// ==================== 生命周期 ====================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -162,6 +162,14 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Delete, Plus } from '@element-plus/icons-vue'
|
import { Delete, Plus } from '@element-plus/icons-vue'
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
|
import { deepCloneByJSON, isValidFormat } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
newData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
// 表单数据
|
// 表单数据
|
||||||
@@ -297,12 +305,31 @@ const DepartmentList = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
DepartmentList()
|
DepartmentList()
|
||||||
|
setFormData(props.newData)
|
||||||
})
|
})
|
||||||
|
|
||||||
const getForm = () => {
|
const getForm = () => {
|
||||||
return formData
|
return formData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setFormData = (data: any) => {
|
||||||
|
if (data && Object.keys(data).length > 0) {
|
||||||
|
const data1 = deepCloneByJSON(data)
|
||||||
|
if (isValidFormat(data1.client_username)) {
|
||||||
|
data1.client_username = JSON.parse(data1.client_username)
|
||||||
|
} else {
|
||||||
|
data1.client_username = []
|
||||||
|
}
|
||||||
|
if (isValidFormat(data1.party_username)) {
|
||||||
|
data1.party_username = JSON.parse(data1.party_username)
|
||||||
|
} else {
|
||||||
|
data1.party_username = []
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const submit = (): Promise<boolean> => {
|
const submit = (): Promise<boolean> => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
formRef.value?.validate((valid: boolean) => {
|
formRef.value?.validate((valid: boolean) => {
|
||||||
|
|||||||
@@ -32,14 +32,6 @@
|
|||||||
<div class="data-table__toolbar">
|
<div class="data-table__toolbar">
|
||||||
<div class="data-table__toolbar--actions">
|
<div class="data-table__toolbar--actions">
|
||||||
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
:disabled="ids.length === 0"
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete()"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -51,36 +43,43 @@
|
|||||||
class="data-table__content"
|
class="data-table__content"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="委托人信息" align="center" prop="client_username">
|
<el-table-column label="委托人信息" align="center" prop="client_username">
|
||||||
<el-table-column v-slot="{ row }" prop="client_username" label="自然人姓名/法人名称">
|
<el-table-column v-slot="{ row }" prop="client_username" label="自然人姓名/法人名称">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.client_username)
|
isValidFormat(row.client_username)
|
||||||
.map((item: any) => item.name)
|
? JSON.parse(row.client_username)
|
||||||
.join(',')
|
.map((item: any) => item.name)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-slot="{ row }" prop="client_username" label="身份证号码/统一代码">
|
<el-table-column v-slot="{ row }" prop="client_username" label="身份证号码/统一代码">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.client_username)
|
isValidFormat(row.client_username)
|
||||||
.map((item: any) => item.idNumber)
|
? JSON.parse(row.client_username)
|
||||||
.join(',')
|
.map((item: any) => item.idNumber)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="相对方信息" align="center" prop="party_username">
|
<el-table-column label="相对方信息" align="center" prop="party_username">
|
||||||
<el-table-column v-slot="{ row }" prop="party_username" label="自然人姓名/法人名称">
|
<el-table-column v-slot="{ row }" prop="party_username" label="自然人姓名/法人名称">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.party_username)
|
isValidFormat(row.party_username)
|
||||||
.map((item: any) => item.name)
|
? JSON.parse(row.party_username)
|
||||||
.join(',')
|
.map((item: any) => item.name)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-slot="{ row }" prop="party_username" label="身份证号码/统一代码">
|
<el-table-column v-slot="{ row }" prop="party_username" label="身份证号码/统一代码">
|
||||||
{{
|
{{
|
||||||
JSON.parse(row.party_username)
|
isValidFormat(row.party_username)
|
||||||
.map((item: any) => item.idNumber)
|
? JSON.parse(row.party_username)
|
||||||
.join(',')
|
.map((item: any) => item.idNumber)
|
||||||
|
.join(',')
|
||||||
|
: '异常'
|
||||||
}}
|
}}
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -94,7 +93,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleOpenDialog(scope.row.id)"
|
@click="handleOpenDialog(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -123,12 +122,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserDeleteDepartment } from '@/api/calibration/department'
|
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
import { functionDialogBox } from '@/utils/functionDialogBox'
|
import { functionDialogBox } from '@/utils/functionDialogBox'
|
||||||
import PreRegistrationForm from './components/PreRegistrationForm.vue'
|
import PreRegistrationForm from './components/PreRegistrationForm.vue'
|
||||||
import { BusinessRegister, BusinessRegisterdetail } from '@/api/calibration/preRegistration'
|
import {
|
||||||
|
BusinessDeleteRegistration,
|
||||||
|
BusinessEditRegistration,
|
||||||
|
BusinessRegister,
|
||||||
|
BusinessRegisterdetail
|
||||||
|
} from '@/api/calibration/preRegistration'
|
||||||
|
import { isValidFormat } from '@/utils/auxiliaryFunction'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Role',
|
name: 'Role',
|
||||||
@@ -193,21 +198,22 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开角色弹窗
|
// 打开角色弹窗
|
||||||
function handleOpenDialog(roleId?: string) {
|
function handleOpenDialog(data?: any) {
|
||||||
dialog.visible = true
|
dialog.visible = true
|
||||||
|
const roleId = data?.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
functionDialogBox(
|
functionDialogBox(
|
||||||
PreRegistrationForm,
|
PreRegistrationForm,
|
||||||
{},
|
{
|
||||||
|
newData: data
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '编辑预立案登记',
|
title: '编辑预立案登记',
|
||||||
width: '900',
|
width: '900',
|
||||||
ok(value: any) {
|
ok(value: any) {
|
||||||
console.log('value', value)
|
console.log('value', value)
|
||||||
|
handleSubmit({ id: roleId, ...value })
|
||||||
}
|
}
|
||||||
// cancel() {
|
|
||||||
// console.log("value");
|
|
||||||
// },
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
@@ -220,9 +226,6 @@ function handleOpenDialog(roleId?: string) {
|
|||||||
ok(value: any) {
|
ok(value: any) {
|
||||||
handleSubmit(value)
|
handleSubmit(value)
|
||||||
}
|
}
|
||||||
// cancel() {
|
|
||||||
// console.log("value");
|
|
||||||
// },
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -233,13 +236,16 @@ function handleSubmit(data: any) {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = data.id
|
const roleId = data.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
// RoleAPI.update(roleId, formData)
|
BusinessEditRegistration({
|
||||||
// .then(() => {
|
...data,
|
||||||
// ElMessage.success('修改成功')
|
client_username: JSON.stringify(data.client_username),
|
||||||
// handleCloseDialog()
|
party_username: JSON.stringify(data.party_username)
|
||||||
// handleResetQuery()
|
})
|
||||||
// })
|
.then(() => {
|
||||||
// .finally(() => (loading.value = false))
|
ElMessage.success('修改成功')
|
||||||
|
handleResetQuery()
|
||||||
|
})
|
||||||
|
.finally(() => (loading.value = false))
|
||||||
} else {
|
} else {
|
||||||
BusinessRegister({
|
BusinessRegister({
|
||||||
...data,
|
...data,
|
||||||
@@ -262,36 +268,9 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
UserDeleteDepartment(id)
|
BusinessDeleteRegistration(id)
|
||||||
.then(() => {
|
.then((res: any) => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success(res.message)
|
||||||
handleResetQuery()
|
|
||||||
})
|
|
||||||
.finally(() => (loading.value = false))
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
ElMessage.info('已取消删除')
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
// 删除角色
|
|
||||||
function handleDelete(roleId?: number) {
|
|
||||||
const roleIds = [roleId || ids.value].join(',')
|
|
||||||
if (!roleIds) {
|
|
||||||
ElMessage.warning('请勾选删除项')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(
|
|
||||||
() => {
|
|
||||||
loading.value = true
|
|
||||||
RoleAPI.deleteByIds(roleIds)
|
|
||||||
.then(() => {
|
|
||||||
ElMessage.success('删除成功')
|
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
})
|
})
|
||||||
.finally(() => (loading.value = false))
|
.finally(() => (loading.value = false))
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
label-width="auto"
|
label-width="auto"
|
||||||
label-position="top"
|
label-position="top"
|
||||||
>
|
>
|
||||||
<el-form-item label="预立案" prop="user_id">
|
<el-form-item v-if="!newData?.id" label="预立案" prop="user_id">
|
||||||
<el-select v-model="formData.user_id" placeholder="请选择预立案">
|
<el-select v-model="formData.user_id" placeholder="请选择预立案">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in userIdList"
|
v-for="(item, index) in userIdList"
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
<el-form-item label="已收款" prop="paymentcollection">
|
<el-form-item label="已收款" prop="paymentcollection">
|
||||||
<el-input v-model="formData.paymentcollection" placeholder="请输入" />
|
<el-input v-model="formData.paymentcollection" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="代办审核人" prop="personincharge">
|
<el-form-item v-if="!newData?.id" label="代办审核人" prop="personincharge">
|
||||||
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in PersoninchargeList"
|
v-for="item in PersoninchargeList"
|
||||||
@@ -114,7 +114,15 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { BusinessPreFilingLinkedCases, BusinessRegistrationlist } from "@/api/calibration/preRegistration";
|
import { BusinessPreFilingLinkedCases } from '@/api/calibration/preRegistration'
|
||||||
|
import { deepCloneByJSON, getFileInfo } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
newData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
// 表单数据
|
// 表单数据
|
||||||
@@ -180,12 +188,24 @@ const onBusinessRegistrationlist = () => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
onBusinessRegistrationlist()
|
onBusinessRegistrationlist()
|
||||||
DepartmentList()
|
DepartmentList()
|
||||||
|
setFormData(props.newData)
|
||||||
})
|
})
|
||||||
|
|
||||||
const getForm = () => {
|
const getForm = () => {
|
||||||
return formData
|
return formData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setFormData = (data: any) => {
|
||||||
|
if (data && Object.keys(data).length > 0) {
|
||||||
|
const data1 = deepCloneByJSON(data)
|
||||||
|
data1.AgencyContract = getFileInfo(data1.AgencyContract)
|
||||||
|
data1.Contractreturn = getFileInfo(data1.Contractreturn)
|
||||||
|
data1.Closingapplication = getFileInfo(data1.Closingapplication)
|
||||||
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const submit = (): Promise<boolean> => {
|
const submit = (): Promise<boolean> => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
formRef.value?.validate((valid: boolean) => {
|
formRef.value?.validate((valid: boolean) => {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
<el-table-column label="代理合同" align="center" prop="AgencyContract">
|
<el-table-column label="代理合同" align="center" prop="AgencyContract">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="row.AgencyContract && isValidJson(row.AgencyContract)"
|
v-if="row.AgencyContract"
|
||||||
:href="getFileInfo(row.AgencyContract)?.url"
|
:href="getFileInfo(row.AgencyContract)?.url"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
<el-table-column label="合同返还" align="center" prop="Contractreturn">
|
<el-table-column label="合同返还" align="center" prop="Contractreturn">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="row.Contractreturn && isValidJson(row.Contractreturn)"
|
v-if="row.Contractreturn"
|
||||||
:href="getFileInfo(row.Contractreturn)?.url"
|
:href="getFileInfo(row.Contractreturn)?.url"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
<el-table-column label="结案申请" align="center" prop="Closingapplication">
|
<el-table-column label="结案申请" align="center" prop="Closingapplication">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="row.Closingapplication && isValidJson(row.Closingapplication)"
|
v-if="row.Closingapplication"
|
||||||
:href="getFileInfo(row.Closingapplication)?.url"
|
:href="getFileInfo(row.Closingapplication)?.url"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleOpenDialog(scope.row.id)"
|
@click="handleOpenDialog(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -184,7 +184,6 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserDeleteDepartment } from '@/api/calibration/department'
|
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
import { functionDialogBox } from '@/utils/functionDialogBox'
|
import { functionDialogBox } from '@/utils/functionDialogBox'
|
||||||
import CaseManagementForm from './components/CaseManagementForm.vue'
|
import CaseManagementForm from './components/CaseManagementForm.vue'
|
||||||
@@ -193,8 +192,9 @@ import CaseInvoiceComponent from './components/CaseInvoiceComponent/index.vue'
|
|||||||
import {
|
import {
|
||||||
BusinessAccumulate,
|
BusinessAccumulate,
|
||||||
BusinessCasemanagement,
|
BusinessCasemanagement,
|
||||||
BusinessCasemanagementdetail
|
BusinessCasemanagementdetail,
|
||||||
} from '@/api/calibration/caseManagement'
|
BusinessDeleteCase, BusinessEditCase,
|
||||||
|
} from "@/api/calibration/caseManagement";
|
||||||
import { getFileInfo, isValidJson } from '@/utils/auxiliaryFunction'
|
import { getFileInfo, isValidJson } from '@/utils/auxiliaryFunction'
|
||||||
import CumulativeReceivedPaymentForm from '@/views/calibration/caseManagement/components/CumulativeReceivedPaymentForm.vue'
|
import CumulativeReceivedPaymentForm from '@/views/calibration/caseManagement/components/CumulativeReceivedPaymentForm.vue'
|
||||||
|
|
||||||
@@ -261,21 +261,20 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开角色弹窗
|
// 打开角色弹窗
|
||||||
function handleOpenDialog(roleId?: string) {
|
function handleOpenDialog(data: any = null) {
|
||||||
dialog.visible = true
|
dialog.visible = true
|
||||||
if (roleId) {
|
if (data) {
|
||||||
functionDialogBox(
|
functionDialogBox(
|
||||||
CaseManagementForm,
|
CaseManagementForm,
|
||||||
{},
|
|
||||||
{
|
{
|
||||||
title: '编辑预立案登记',
|
newData: data
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '编辑案件',
|
||||||
width: '900',
|
width: '900',
|
||||||
ok(value: any) {
|
ok(value: any) {
|
||||||
console.log('value', value)
|
handleSubmit({ id: data.id, ...value })
|
||||||
}
|
}
|
||||||
// cancel() {
|
|
||||||
// console.log("value");
|
|
||||||
// },
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
@@ -349,13 +348,12 @@ function handleSubmit(data: any) {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = data.id
|
const roleId = data.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
// RoleAPI.update(roleId, formData)
|
BusinessEditCase(data)
|
||||||
// .then(() => {
|
.then(() => {
|
||||||
// ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
// handleCloseDialog()
|
handleResetQuery()
|
||||||
// handleResetQuery()
|
})
|
||||||
// })
|
.finally(() => (loading.value = false))
|
||||||
// .finally(() => (loading.value = false))
|
|
||||||
} else {
|
} else {
|
||||||
BusinessCasemanagement(data)
|
BusinessCasemanagement(data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -374,7 +372,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
UserDeleteDepartment(id)
|
BusinessDeleteCase(id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
|
|||||||
@@ -52,6 +52,14 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { deepCloneByJSON, getFileInfo } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
newData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
// 表单数据
|
// 表单数据
|
||||||
@@ -103,12 +111,22 @@ const DepartmentList = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
DepartmentList()
|
DepartmentList()
|
||||||
|
setFormData(props.newData)
|
||||||
})
|
})
|
||||||
|
|
||||||
const getForm = () => {
|
const getForm = () => {
|
||||||
return formData
|
return formData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setFormData = (data: any) => {
|
||||||
|
if (data && Object.keys(data).length > 0) {
|
||||||
|
const data1 = deepCloneByJSON(data)
|
||||||
|
data1.contract = getFileInfo(data1.contract)
|
||||||
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const submit = (): Promise<boolean> => {
|
const submit = (): Promise<boolean> => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
formRef.value?.validate((valid: boolean) => {
|
formRef.value?.validate((valid: boolean) => {
|
||||||
|
|||||||
@@ -32,14 +32,6 @@
|
|||||||
<div class="data-table__toolbar">
|
<div class="data-table__toolbar">
|
||||||
<div class="data-table__toolbar--actions">
|
<div class="data-table__toolbar--actions">
|
||||||
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
:disabled="ids.length === 0"
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete()"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -58,11 +50,7 @@
|
|||||||
<el-table-column label="入库期限" prop="deadline" />
|
<el-table-column label="入库期限" prop="deadline" />
|
||||||
<el-table-column label="用印文件" prop="contract">
|
<el-table-column label="用印文件" prop="contract">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-link
|
<el-link v-if="row.contract" :href="getFileInfo(row.contract)?.url" target="_blank">
|
||||||
v-if="row.contract && isValidJson(row.contract)"
|
|
||||||
:href="getFileInfo(row.contract)?.url"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
{{ getFileInfo(row.contract)?.name }}
|
{{ getFileInfo(row.contract)?.name }}
|
||||||
</el-link>
|
</el-link>
|
||||||
<span v-else>无</span>
|
<span v-else>无</span>
|
||||||
@@ -76,7 +64,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleOpenDialog(scope.row.id)"
|
@click="handleOpenDialog(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -106,13 +94,14 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserDeleteDepartment } from '@/api/calibration/department'
|
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
import { functionDialogBox } from '@/utils/functionDialogBox'
|
import { functionDialogBox } from '@/utils/functionDialogBox'
|
||||||
import StampingForm from './components/StampingForm.vue'
|
import StampingForm from './components/StampingForm.vue'
|
||||||
|
|
||||||
import { getFileInfo, isValidJson } from '@/utils/auxiliaryFunction'
|
import { getFileInfo } from '@/utils/auxiliaryFunction'
|
||||||
import {
|
import {
|
||||||
|
BusinessDeleteWarehousing,
|
||||||
|
BusinessEditWarehousing,
|
||||||
BusinessWarehousing,
|
BusinessWarehousing,
|
||||||
BusinessWarehousingdetail
|
BusinessWarehousingdetail
|
||||||
} from '@/api/calibration/inventoryRegistration'
|
} from '@/api/calibration/inventoryRegistration'
|
||||||
@@ -177,21 +166,20 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开角色弹窗
|
// 打开角色弹窗
|
||||||
function handleOpenDialog(roleId?: string) {
|
function handleOpenDialog(data: any = null) {
|
||||||
dialog.visible = true
|
dialog.visible = true
|
||||||
if (roleId) {
|
if (data) {
|
||||||
functionDialogBox(
|
functionDialogBox(
|
||||||
StampingForm,
|
StampingForm,
|
||||||
{},
|
{
|
||||||
|
newData: data
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '编辑申请用印',
|
title: '编辑申请用印',
|
||||||
width: '900',
|
width: '900',
|
||||||
ok(value: any) {
|
ok(value: any) {
|
||||||
console.log('value', value)
|
handleSubmit({ id: data.id, ...value })
|
||||||
}
|
}
|
||||||
// cancel() {
|
|
||||||
// console.log("value");
|
|
||||||
// },
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
@@ -214,13 +202,12 @@ function handleSubmit(data: any) {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = data.id
|
const roleId = data.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
// RoleAPI.update(roleId, formData)
|
BusinessEditWarehousing(data)
|
||||||
// .then(() => {
|
.then(() => {
|
||||||
// ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
// handleCloseDialog()
|
handleResetQuery()
|
||||||
// handleResetQuery()
|
})
|
||||||
// })
|
.finally(() => (loading.value = false))
|
||||||
// .finally(() => (loading.value = false))
|
|
||||||
} else {
|
} else {
|
||||||
BusinessWarehousing(data)
|
BusinessWarehousing(data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -239,7 +226,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
UserDeleteDepartment(id)
|
BusinessDeleteWarehousing(id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
|
|||||||
@@ -32,14 +32,6 @@
|
|||||||
<div class="data-table__toolbar">
|
<div class="data-table__toolbar">
|
||||||
<div class="data-table__toolbar--actions">
|
<div class="data-table__toolbar--actions">
|
||||||
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
:disabled="ids.length === 0"
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete()"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -69,7 +61,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleOpenDialog(scope.row.id)"
|
@click="handleOpenDialog(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -209,9 +201,14 @@ import { useUserStore } from '@/store'
|
|||||||
import { DeviceEnum } from '@/enums/settings/device-enum'
|
import { DeviceEnum } from '@/enums/settings/device-enum'
|
||||||
|
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserDeleteDepartment } from '@/api/calibration/department'
|
import {
|
||||||
import { FinanceIssueDetail, FinanceIssueInvoice } from '@/api/calibration/invoiceApplication'
|
FinanceDeleteInvoice,
|
||||||
|
FinanceEditInvoice,
|
||||||
|
FinanceIssueDetail,
|
||||||
|
FinanceIssueInvoice
|
||||||
|
} from '@/api/calibration/invoiceApplication'
|
||||||
import { QuestionFilled, Switch } from '@element-plus/icons-vue'
|
import { QuestionFilled, Switch } from '@element-plus/icons-vue'
|
||||||
|
import { deepCloneByJSON } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Role',
|
name: 'Role',
|
||||||
@@ -251,6 +248,7 @@ const drawerSize = computed(() => (appStore.device === DeviceEnum.DESKTOP ? '600
|
|||||||
|
|
||||||
// 角色表单
|
// 角色表单
|
||||||
const formData = reactive<any>({
|
const formData = reactive<any>({
|
||||||
|
id: '',
|
||||||
ContractNo: '',
|
ContractNo: '',
|
||||||
personincharge: '',
|
personincharge: '',
|
||||||
amount: '',
|
amount: '',
|
||||||
@@ -318,15 +316,17 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开角色弹窗
|
// 打开角色弹窗
|
||||||
function handleOpenDialog(roleId?: string) {
|
function handleOpenDialog(data: any = null) {
|
||||||
dialog.visible = true
|
dialog.visible = true
|
||||||
if (roleId) {
|
if (data) {
|
||||||
dialog.title = '修改角色'
|
dialog.title = '修改开票申请'
|
||||||
RoleAPI.getFormData(roleId).then((data) => {
|
if (data && Object.keys(data).length > 0) {
|
||||||
Object.assign(formData, data)
|
const data1 = deepCloneByJSON(data)
|
||||||
})
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dialog.title = '新增角色'
|
dialog.title = '新增开票申请'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@ function handleSubmit() {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = formData.id
|
const roleId = formData.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
RoleAPI.update(roleId, formData)
|
FinanceEditInvoice(formData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
handleCloseDialog()
|
handleCloseDialog()
|
||||||
@@ -378,7 +378,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
UserDeleteDepartment(id)
|
FinanceDeleteInvoice(id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
@@ -390,58 +390,6 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// 删除角色
|
|
||||||
function handleDelete(roleId?: number) {
|
|
||||||
const roleIds = [roleId || ids.value].join(',')
|
|
||||||
if (!roleIds) {
|
|
||||||
ElMessage.warning('请勾选删除项')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(
|
|
||||||
() => {
|
|
||||||
loading.value = true
|
|
||||||
RoleAPI.deleteByIds(roleIds)
|
|
||||||
.then(() => {
|
|
||||||
ElMessage.success('删除成功')
|
|
||||||
handleResetQuery()
|
|
||||||
})
|
|
||||||
.finally(() => (loading.value = false))
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
ElMessage.info('已取消删除')
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 打开分配菜单权限弹窗
|
|
||||||
// async function handleOpenAssignPermDialog(row: RolePageVO) {
|
|
||||||
// const roleId = row.id;
|
|
||||||
// if (roleId) {
|
|
||||||
// assignPermDialogVisible.value = true;
|
|
||||||
// loading.value = true;
|
|
||||||
//
|
|
||||||
// checkedRole.value.id = roleId;
|
|
||||||
// checkedRole.value.name = row.name;
|
|
||||||
//
|
|
||||||
// // 获取所有的菜单
|
|
||||||
// menuPermOptions.value = await MenuAPI.getOptions();
|
|
||||||
//
|
|
||||||
// // 回显角色已拥有的菜单
|
|
||||||
// RoleAPI.getRoleMenuIds(roleId)
|
|
||||||
// .then((data) => {
|
|
||||||
// const checkedMenuIds = data;
|
|
||||||
// checkedMenuIds.forEach((menuId) => permTreeRef.value!.setChecked(menuId, true, false));
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// loading.value = false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 分配菜单权限提交
|
// 分配菜单权限提交
|
||||||
function handleAssignPermSubmit() {
|
function handleAssignPermSubmit() {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="item-arrow">
|
<div class="item-arrow">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="item.file && isValidJson(item.file)"
|
v-if="item.file"
|
||||||
type="primary"
|
type="primary"
|
||||||
:href="getFileInfo(item.file)?.url"
|
:href="getFileInfo(item.file)?.url"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@@ -40,10 +40,10 @@ import {
|
|||||||
import { BusinessEditBulletin } from '@/api/calibration/announcementManagement'
|
import { BusinessEditBulletin } from '@/api/calibration/announcementManagement'
|
||||||
import { functionDialogBox } from '@/utils/functionDialogBox'
|
import { functionDialogBox } from '@/utils/functionDialogBox'
|
||||||
import LawFirmStandardsForm from './components/LawFirmStandardsForm.vue'
|
import LawFirmStandardsForm from './components/LawFirmStandardsForm.vue'
|
||||||
import { getFileInfo, isValidJson } from '@/utils/auxiliaryFunction'
|
import { getFileInfo } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
// 定义列表数据
|
// 定义列表数据
|
||||||
const performanceList = ref([])
|
const performanceList = ref<any[]>([])
|
||||||
|
|
||||||
// 获取数据
|
// 获取数据
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
@@ -117,13 +117,12 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
|
||||||
BusinessLwaDetail(id)
|
BusinessLwaDetail(id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
})
|
})
|
||||||
.finally(() => (loading.value = false))
|
.finally(() => ({}))
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
ElMessage.info('已取消删除')
|
ElMessage.info('已取消删除')
|
||||||
@@ -132,7 +131,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 点击事件处理
|
// 点击事件处理
|
||||||
function handleItemClick(item) {
|
function handleItemClick(item: any) {
|
||||||
ElMessage.info(`您点击了:${item.title}`)
|
ElMessage.info(`您点击了:${item.title}`)
|
||||||
|
|
||||||
// 这里可以添加跳转或其他逻辑
|
// 这里可以添加跳转或其他逻辑
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { convertFilePathsToObject, isValidJson } from '@/utils/auxiliaryFunction'
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
newData: {
|
newData: {
|
||||||
@@ -68,11 +67,7 @@ function deepCloneByJSON(obj: any) {
|
|||||||
const setFormData = (data: any) => {
|
const setFormData = (data: any) => {
|
||||||
if (data && Object.keys(data).length > 0) {
|
if (data && Object.keys(data).length > 0) {
|
||||||
const data1 = deepCloneByJSON(data)
|
const data1 = deepCloneByJSON(data)
|
||||||
if (data1.file && isValidJson(data1.file)) {
|
data1.tiems = [data1.tiems, data1.end_time]
|
||||||
data1.file = convertFilePathsToObject(JSON.parse(data1.file))[0]
|
|
||||||
} else {
|
|
||||||
data1.file = undefined
|
|
||||||
}
|
|
||||||
Object.assign(formData, data1)
|
Object.assign(formData, data1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,6 @@
|
|||||||
<div class="data-table__toolbar">
|
<div class="data-table__toolbar">
|
||||||
<div class="data-table__toolbar--actions">
|
<div class="data-table__toolbar--actions">
|
||||||
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
:disabled="ids.length === 0"
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete()"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -74,13 +66,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
import { functionDialogBox } from '@/utils/functionDialogBox'
|
import { functionDialogBox } from '@/utils/functionDialogBox'
|
||||||
import LmportantScheduleForm from './components/LmportantScheduleForm.vue'
|
import LmportantScheduleForm from './components/LmportantScheduleForm.vue'
|
||||||
import { BusinessEditBulletin } from '@/api/calibration/announcementManagement'
|
|
||||||
import {
|
import {
|
||||||
BusinessDscheduledetail,
|
BusinessDscheduledetail,
|
||||||
|
BusinessEditSchedule,
|
||||||
BusinessHandleSchedule,
|
BusinessHandleSchedule,
|
||||||
BusinessSchedule,
|
BusinessSchedule,
|
||||||
BusinessScheduleDetail
|
BusinessScheduleDetail
|
||||||
@@ -101,8 +93,6 @@ const personinchargeList = ref<any[]>([])
|
|||||||
const queryParams = reactive<any>({
|
const queryParams = reactive<any>({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
// times: [],
|
|
||||||
// unit: ''
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 表格数据
|
// 表格数据
|
||||||
@@ -182,7 +172,7 @@ function handleSubmit(data: any) {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = data.id
|
const roleId = data.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
BusinessEditBulletin(data)
|
BusinessEditSchedule(data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
@@ -219,7 +209,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const CompleteTheSchedule = (data) => {
|
const CompleteTheSchedule = (data: any) => {
|
||||||
ElMessageBox.confirm('确认已经完成该日程吗?', {
|
ElMessageBox.confirm('确认已经完成该日程吗?', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
@@ -235,34 +225,6 @@ const CompleteTheSchedule = (data) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除角色
|
|
||||||
function handleDelete(roleId?: number) {
|
|
||||||
const roleIds = [roleId || ids.value].join(',')
|
|
||||||
if (!roleIds) {
|
|
||||||
ElMessage.warning('请勾选删除项')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(
|
|
||||||
() => {
|
|
||||||
loading.value = true
|
|
||||||
RoleAPI.deleteByIds(roleIds)
|
|
||||||
.then(() => {
|
|
||||||
ElMessage.success('删除成功')
|
|
||||||
handleResetQuery()
|
|
||||||
})
|
|
||||||
.finally(() => (loading.value = false))
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
ElMessage.info('已取消删除')
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const DepartmentList = () => {
|
const DepartmentList = () => {
|
||||||
UserPersonneldisplay().then((res: any) => {
|
UserPersonneldisplay().then((res: any) => {
|
||||||
personinchargeList.value = res.data
|
personinchargeList.value = res.data
|
||||||
|
|||||||
@@ -32,14 +32,6 @@
|
|||||||
<div class="data-table__toolbar">
|
<div class="data-table__toolbar">
|
||||||
<div class="data-table__toolbar--actions">
|
<div class="data-table__toolbar--actions">
|
||||||
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
:disabled="ids.length === 0"
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete()"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -66,7 +58,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleOpenDialog(scope.row.id)"
|
@click="handleOpenDialog(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -126,7 +118,7 @@
|
|||||||
<el-form-item label="申请人" prop="applicant">
|
<el-form-item label="申请人" prop="applicant">
|
||||||
<el-input v-model="formData.applicant" placeholder="请输入申请人" />
|
<el-input v-model="formData.applicant" placeholder="请输入申请人" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="代办审核人" prop="personincharge">
|
<el-form-item v-if="!formData?.id" label="代办审核人" prop="personincharge">
|
||||||
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in personinchargeList"
|
v-for="item in personinchargeList"
|
||||||
@@ -214,12 +206,14 @@ import { useAppStore } from '@/store/modules/app-store'
|
|||||||
import { DeviceEnum } from '@/enums/settings/device-enum'
|
import { DeviceEnum } from '@/enums/settings/device-enum'
|
||||||
|
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserDeleteDepartment } from '@/api/calibration/department'
|
|
||||||
import {
|
import {
|
||||||
|
FinanceDeletePayment,
|
||||||
|
FinanceEditPayment,
|
||||||
FinancePaymentDisplay,
|
FinancePaymentDisplay,
|
||||||
FinancePaymentRequest
|
FinancePaymentRequest
|
||||||
} from '@/api/calibration/paymentApplicationForm'
|
} from '@/api/calibration/paymentApplicationForm'
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
|
import { deepCloneByJSON } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Role',
|
name: 'Role',
|
||||||
@@ -259,6 +253,7 @@ const drawerSize = computed(() => (appStore.device === DeviceEnum.DESKTOP ? '600
|
|||||||
|
|
||||||
// 角色表单
|
// 角色表单
|
||||||
const formData = reactive<any>({
|
const formData = reactive<any>({
|
||||||
|
id: '',
|
||||||
reason: '',
|
reason: '',
|
||||||
amount: '',
|
amount: '',
|
||||||
times: '',
|
times: '',
|
||||||
@@ -325,15 +320,17 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开角色弹窗
|
// 打开角色弹窗
|
||||||
function handleOpenDialog(roleId?: string) {
|
function handleOpenDialog(data: any = null) {
|
||||||
dialog.visible = true
|
dialog.visible = true
|
||||||
if (roleId) {
|
if (data) {
|
||||||
dialog.title = '修改角色'
|
dialog.title = '修改付款申请单'
|
||||||
RoleAPI.getFormData(roleId).then((data) => {
|
if (data && Object.keys(data).length > 0) {
|
||||||
Object.assign(formData, data)
|
const data1 = deepCloneByJSON(data)
|
||||||
})
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dialog.title = '新增角色'
|
dialog.title = '新增付款申请单'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -344,7 +341,7 @@ function handleSubmit() {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = formData.id
|
const roleId = formData.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
RoleAPI.update(roleId, formData)
|
FinanceEditPayment(formData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
handleCloseDialog()
|
handleCloseDialog()
|
||||||
@@ -384,7 +381,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
UserDeleteDepartment(id)
|
FinanceDeletePayment(id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
@@ -396,58 +393,6 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// 删除角色
|
|
||||||
function handleDelete(roleId?: number) {
|
|
||||||
const roleIds = [roleId || ids.value].join(',')
|
|
||||||
if (!roleIds) {
|
|
||||||
ElMessage.warning('请勾选删除项')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(
|
|
||||||
() => {
|
|
||||||
loading.value = true
|
|
||||||
RoleAPI.deleteByIds(roleIds)
|
|
||||||
.then(() => {
|
|
||||||
ElMessage.success('删除成功')
|
|
||||||
handleResetQuery()
|
|
||||||
})
|
|
||||||
.finally(() => (loading.value = false))
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
ElMessage.info('已取消删除')
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 打开分配菜单权限弹窗
|
|
||||||
// async function handleOpenAssignPermDialog(row: RolePageVO) {
|
|
||||||
// const roleId = row.id;
|
|
||||||
// if (roleId) {
|
|
||||||
// assignPermDialogVisible.value = true;
|
|
||||||
// loading.value = true;
|
|
||||||
//
|
|
||||||
// checkedRole.value.id = roleId;
|
|
||||||
// checkedRole.value.name = row.name;
|
|
||||||
//
|
|
||||||
// // 获取所有的菜单
|
|
||||||
// menuPermOptions.value = await MenuAPI.getOptions();
|
|
||||||
//
|
|
||||||
// // 回显角色已拥有的菜单
|
|
||||||
// RoleAPI.getRoleMenuIds(roleId)
|
|
||||||
// .then((data) => {
|
|
||||||
// const checkedMenuIds = data;
|
|
||||||
// checkedMenuIds.forEach((menuId) => permTreeRef.value!.setChecked(menuId, true, false));
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// loading.value = false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 分配菜单权限提交
|
// 分配菜单权限提交
|
||||||
function handleAssignPermSubmit() {
|
function handleAssignPermSubmit() {
|
||||||
|
|||||||
@@ -242,7 +242,7 @@
|
|||||||
v-for="(item, index) in roleList"
|
v-for="(item, index) in roleList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.RoleName"
|
:label="item.RoleName"
|
||||||
:value="item.id"
|
:value="Number(item.id)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -769,7 +769,9 @@ async function handleOpenDialog(data?: any): Promise<void> {
|
|||||||
} else {
|
} else {
|
||||||
data1.ApplicationForm = undefined
|
data1.ApplicationForm = undefined
|
||||||
}
|
}
|
||||||
|
data1.department = data1.department.map((item: any) => item.id)
|
||||||
|
data1.role = data1.role.map((item: any) => item.id)
|
||||||
|
console.log(data1.department, data1.role)
|
||||||
Object.assign(formData, data1)
|
Object.assign(formData, data1)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error('加载用户数据失败')
|
ElMessage.error('加载用户数据失败')
|
||||||
|
|||||||
@@ -32,14 +32,6 @@
|
|||||||
<div class="data-table__toolbar">
|
<div class="data-table__toolbar">
|
||||||
<div class="data-table__toolbar--actions">
|
<div class="data-table__toolbar--actions">
|
||||||
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
:disabled="ids.length === 0"
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete()"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -64,7 +56,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleOpenDialog(scope.row.id)"
|
@click="handleOpenDialog(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -118,7 +110,7 @@
|
|||||||
<el-form-item label="费用说明" prop="FeeDescription">
|
<el-form-item label="费用说明" prop="FeeDescription">
|
||||||
<el-input v-model="formData.FeeDescription" placeholder="请输入费用说明" />
|
<el-input v-model="formData.FeeDescription" placeholder="请输入费用说明" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="代办审核人" prop="personincharge">
|
<el-form-item v-if="!formData?.id" label="代办审核人" prop="personincharge">
|
||||||
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in personinchargeList"
|
v-for="item in personinchargeList"
|
||||||
@@ -206,9 +198,14 @@ import { useAppStore } from '@/store/modules/app-store'
|
|||||||
import { DeviceEnum } from '@/enums/settings/device-enum'
|
import { DeviceEnum } from '@/enums/settings/device-enum'
|
||||||
|
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserDeleteDepartment } from '@/api/calibration/department'
|
import {
|
||||||
import { FinanceReidetail, FinanceReimbursement } from '@/api/calibration/reimbursement'
|
FinanceDeleteReimbursement,
|
||||||
|
FinanceEditReimbursement,
|
||||||
|
FinanceReidetail,
|
||||||
|
FinanceReimbursement
|
||||||
|
} from '@/api/calibration/reimbursement'
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
|
import { deepCloneByJSON } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Role',
|
name: 'Role',
|
||||||
@@ -248,6 +245,7 @@ const drawerSize = computed(() => (appStore.device === DeviceEnum.DESKTOP ? '600
|
|||||||
|
|
||||||
// 角色表单
|
// 角色表单
|
||||||
const formData = reactive<any>({
|
const formData = reactive<any>({
|
||||||
|
id: '',
|
||||||
person: '',
|
person: '',
|
||||||
times: '',
|
times: '',
|
||||||
reason: '',
|
reason: '',
|
||||||
@@ -310,15 +308,17 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开角色弹窗
|
// 打开角色弹窗
|
||||||
function handleOpenDialog(roleId?: string) {
|
function handleOpenDialog(data: any = null) {
|
||||||
dialog.visible = true
|
dialog.visible = true
|
||||||
if (roleId) {
|
if (data) {
|
||||||
dialog.title = '修改角色'
|
dialog.title = '修改报销申请'
|
||||||
RoleAPI.getFormData(roleId).then((data) => {
|
if (data && Object.keys(data).length > 0) {
|
||||||
Object.assign(formData, data)
|
const data1 = deepCloneByJSON(data)
|
||||||
})
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dialog.title = '新增角色'
|
dialog.title = '新增报销申请'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ function handleSubmit() {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = formData.id
|
const roleId = formData.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
RoleAPI.update(roleId, formData)
|
FinanceEditReimbursement(formData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
handleCloseDialog()
|
handleCloseDialog()
|
||||||
@@ -369,7 +369,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
UserDeleteDepartment(id)
|
FinanceDeleteReimbursement(id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
@@ -381,58 +381,6 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// 删除角色
|
|
||||||
function handleDelete(roleId?: number) {
|
|
||||||
const roleIds = [roleId || ids.value].join(',')
|
|
||||||
if (!roleIds) {
|
|
||||||
ElMessage.warning('请勾选删除项')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(
|
|
||||||
() => {
|
|
||||||
loading.value = true
|
|
||||||
RoleAPI.deleteByIds(roleIds)
|
|
||||||
.then(() => {
|
|
||||||
ElMessage.success('删除成功')
|
|
||||||
handleResetQuery()
|
|
||||||
})
|
|
||||||
.finally(() => (loading.value = false))
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
ElMessage.info('已取消删除')
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 打开分配菜单权限弹窗
|
|
||||||
// async function handleOpenAssignPermDialog(row: RolePageVO) {
|
|
||||||
// const roleId = row.id;
|
|
||||||
// if (roleId) {
|
|
||||||
// assignPermDialogVisible.value = true;
|
|
||||||
// loading.value = true;
|
|
||||||
//
|
|
||||||
// checkedRole.value.id = roleId;
|
|
||||||
// checkedRole.value.name = row.name;
|
|
||||||
//
|
|
||||||
// // 获取所有的菜单
|
|
||||||
// menuPermOptions.value = await MenuAPI.getOptions();
|
|
||||||
//
|
|
||||||
// // 回显角色已拥有的菜单
|
|
||||||
// RoleAPI.getRoleMenuIds(roleId)
|
|
||||||
// .then((data) => {
|
|
||||||
// const checkedMenuIds = data;
|
|
||||||
// checkedMenuIds.forEach((menuId) => permTreeRef.value!.setChecked(menuId, true, false));
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// loading.value = false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 分配菜单权限提交
|
// 分配菜单权限提交
|
||||||
function handleAssignPermSubmit() {
|
function handleAssignPermSubmit() {
|
||||||
|
|||||||
@@ -32,14 +32,6 @@
|
|||||||
<div class="data-table__toolbar">
|
<div class="data-table__toolbar">
|
||||||
<div class="data-table__toolbar--actions">
|
<div class="data-table__toolbar--actions">
|
||||||
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
:disabled="ids.length === 0"
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete()"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -64,7 +56,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleOpenDialog(scope.row.id)"
|
@click="handleOpenDialog(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -118,7 +110,7 @@
|
|||||||
<el-form-item label="收入分配" prop="allocate">
|
<el-form-item label="收入分配" prop="allocate">
|
||||||
<el-input v-model="formData.allocate" placeholder="请输入收入分配" />
|
<el-input v-model="formData.allocate" placeholder="请输入收入分配" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="代办审核人" prop="personincharge">
|
<el-form-item v-if="!formData?.id" label="代办审核人" prop="personincharge">
|
||||||
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in personinchargeList"
|
v-for="item in personinchargeList"
|
||||||
@@ -206,9 +198,14 @@ import { useAppStore } from '@/store/modules/app-store'
|
|||||||
import { DeviceEnum } from '@/enums/settings/device-enum'
|
import { DeviceEnum } from '@/enums/settings/device-enum'
|
||||||
|
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserDeleteDepartment } from '@/api/calibration/department'
|
import {
|
||||||
import { FinanceConfirm, FinanceConfirmdisplay } from '@/api/calibration/revenueRecognition'
|
FinanceConfirm,
|
||||||
|
FinanceConfirmdisplay,
|
||||||
|
FinanceDeleteIncome,
|
||||||
|
FinanceEditIncome
|
||||||
|
} from '@/api/calibration/revenueRecognition'
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
|
import { deepCloneByJSON } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Role',
|
name: 'Role',
|
||||||
@@ -248,6 +245,7 @@ const drawerSize = computed(() => (appStore.device === DeviceEnum.DESKTOP ? '600
|
|||||||
|
|
||||||
// 角色表单
|
// 角色表单
|
||||||
const formData = reactive<any>({
|
const formData = reactive<any>({
|
||||||
|
id: '',
|
||||||
times: '',
|
times: '',
|
||||||
ContractNo: '',
|
ContractNo: '',
|
||||||
CustomerID: '',
|
CustomerID: '',
|
||||||
@@ -265,7 +263,7 @@ const rules = reactive({
|
|||||||
personincharge: [{ required: true, message: '请输入工资', trigger: 'blur' }]
|
personincharge: [{ required: true, message: '请输入工资', trigger: 'blur' }]
|
||||||
})
|
})
|
||||||
|
|
||||||
// 选中的角色
|
// 选中的
|
||||||
interface CheckedRole {
|
interface CheckedRole {
|
||||||
id?: string
|
id?: string
|
||||||
name?: string
|
name?: string
|
||||||
@@ -310,15 +308,17 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开角色弹窗
|
// 打开角色弹窗
|
||||||
function handleOpenDialog(roleId?: string) {
|
function handleOpenDialog(data: any = null) {
|
||||||
dialog.visible = true
|
dialog.visible = true
|
||||||
if (roleId) {
|
if (data) {
|
||||||
dialog.title = '修改角色'
|
dialog.title = '修改收入确认'
|
||||||
RoleAPI.getFormData(roleId).then((data) => {
|
if (data && Object.keys(data).length > 0) {
|
||||||
Object.assign(formData, data)
|
const data1 = deepCloneByJSON(data)
|
||||||
})
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dialog.title = '新增角色'
|
dialog.title = '新增收入确认'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ function handleSubmit() {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = formData.id
|
const roleId = formData.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
RoleAPI.update(roleId, formData)
|
FinanceEditIncome(formData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
handleCloseDialog()
|
handleCloseDialog()
|
||||||
@@ -369,7 +369,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
UserDeleteDepartment(id)
|
FinanceDeleteIncome(id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
@@ -381,58 +381,6 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// 删除角色
|
|
||||||
function handleDelete(roleId?: number) {
|
|
||||||
const roleIds = [roleId || ids.value].join(',')
|
|
||||||
if (!roleIds) {
|
|
||||||
ElMessage.warning('请勾选删除项')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(
|
|
||||||
() => {
|
|
||||||
loading.value = true
|
|
||||||
RoleAPI.deleteByIds(roleIds)
|
|
||||||
.then(() => {
|
|
||||||
ElMessage.success('删除成功')
|
|
||||||
handleResetQuery()
|
|
||||||
})
|
|
||||||
.finally(() => (loading.value = false))
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
ElMessage.info('已取消删除')
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 打开分配菜单权限弹窗
|
|
||||||
// async function handleOpenAssignPermDialog(row: RolePageVO) {
|
|
||||||
// const roleId = row.id;
|
|
||||||
// if (roleId) {
|
|
||||||
// assignPermDialogVisible.value = true;
|
|
||||||
// loading.value = true;
|
|
||||||
//
|
|
||||||
// checkedRole.value.id = roleId;
|
|
||||||
// checkedRole.value.name = row.name;
|
|
||||||
//
|
|
||||||
// // 获取所有的菜单
|
|
||||||
// menuPermOptions.value = await MenuAPI.getOptions();
|
|
||||||
//
|
|
||||||
// // 回显角色已拥有的菜单
|
|
||||||
// RoleAPI.getRoleMenuIds(roleId)
|
|
||||||
// .then((data) => {
|
|
||||||
// const checkedMenuIds = data;
|
|
||||||
// checkedMenuIds.forEach((menuId) => permTreeRef.value!.setChecked(menuId, true, false));
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// loading.value = false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 分配菜单权限提交
|
// 分配菜单权限提交
|
||||||
function handleAssignPermSubmit() {
|
function handleAssignPermSubmit() {
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { deepCloneByJSON } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
newData: {
|
newData: {
|
||||||
@@ -42,15 +43,6 @@ onMounted(() => {
|
|||||||
setFormData(props.newData)
|
setFormData(props.newData)
|
||||||
})
|
})
|
||||||
|
|
||||||
function deepCloneByJSON(obj: any) {
|
|
||||||
try {
|
|
||||||
return JSON.parse(JSON.stringify(obj))
|
|
||||||
} catch (error) {
|
|
||||||
console.error('深拷贝失败:', error)
|
|
||||||
return obj
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const setFormData = (data: any) => {
|
const setFormData = (data: any) => {
|
||||||
if (data && Object.keys(data).length > 0) {
|
if (data && Object.keys(data).length > 0) {
|
||||||
const data1 = deepCloneByJSON(data)
|
const data1 = deepCloneByJSON(data)
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ import {
|
|||||||
BusinessDeleteRole,
|
BusinessDeleteRole,
|
||||||
BusinessDisplayRole,
|
BusinessDisplayRole,
|
||||||
BusinessEditRole,
|
BusinessEditRole,
|
||||||
|
BusinessGetRolePermissions,
|
||||||
BusinessModifypermissions
|
BusinessModifypermissions
|
||||||
} from '@/api/calibration/roleManagement'
|
} from '@/api/calibration/roleManagement'
|
||||||
|
|
||||||
@@ -226,18 +227,21 @@ function handleSubmit(data: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const grantPermissions = (id: string) => {
|
const grantPermissions = (id: string) => {
|
||||||
functionDialogBox(
|
BusinessGetRolePermissions(id).then((res: any) => {
|
||||||
GrantPermissionsForm,
|
functionDialogBox(
|
||||||
{},
|
GrantPermissionsForm,
|
||||||
{
|
{
|
||||||
title: '权限分配',
|
newData: res.data
|
||||||
width: '900',
|
},
|
||||||
ok(value: any) {
|
{
|
||||||
console.log(value)
|
title: '权限分配',
|
||||||
onBusinessModifypermissions({ id, permissionId: value })
|
width: '900',
|
||||||
|
ok(value: any) {
|
||||||
|
onBusinessModifypermissions({ id, permissionId: value })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const onBusinessModifypermissions = (data: any) => {
|
const onBusinessModifypermissions = (data: any) => {
|
||||||
|
|||||||
@@ -32,14 +32,6 @@
|
|||||||
<div class="data-table__toolbar">
|
<div class="data-table__toolbar">
|
||||||
<div class="data-table__toolbar--actions">
|
<div class="data-table__toolbar--actions">
|
||||||
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
<el-button type="success" icon="plus" @click="handleOpenDialog()">新增</el-button>
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
:disabled="ids.length === 0"
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete()"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -64,7 +56,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleOpenDialog(scope.row.id)"
|
@click="handleOpenDialog(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -107,7 +99,7 @@
|
|||||||
<el-form-item label="调整说明" prop="Instructions">
|
<el-form-item label="调整说明" prop="Instructions">
|
||||||
<el-input v-model="formData.Instructions" placeholder="请输入调整说明" />
|
<el-input v-model="formData.Instructions" placeholder="请输入调整说明" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="代办审核人" prop="personincharge">
|
<el-form-item v-if="!formData?.id" label="代办审核人" prop="personincharge">
|
||||||
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
<el-select v-model="formData.personincharge" placeholder="请选择代办审核人">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in personinchargeList"
|
v-for="item in personinchargeList"
|
||||||
@@ -195,9 +187,14 @@ import { useAppStore } from '@/store/modules/app-store'
|
|||||||
import { DeviceEnum } from '@/enums/settings/device-enum'
|
import { DeviceEnum } from '@/enums/settings/device-enum'
|
||||||
|
|
||||||
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
import RoleAPI, { RolePageVO } from '@/api/system/role-api'
|
||||||
import { UserDeleteDepartment } from '@/api/calibration/department'
|
|
||||||
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
import { UserPersonneldisplay } from '@/api/calibration/personnelManagement'
|
||||||
import { FinanceChange, FinanceChangeDetail } from '@/api/calibration/salaryBonusAdjustment'
|
import {
|
||||||
|
FinanceChange,
|
||||||
|
FinanceChangeDetail,
|
||||||
|
FinanceDeleteBonusChange,
|
||||||
|
FinanceEditBonusChange
|
||||||
|
} from '@/api/calibration/salaryBonusAdjustment'
|
||||||
|
import { deepCloneByJSON } from '@/utils/auxiliaryFunction'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Role',
|
name: 'Role',
|
||||||
@@ -237,6 +234,7 @@ const drawerSize = computed(() => (appStore.device === DeviceEnum.DESKTOP ? '600
|
|||||||
|
|
||||||
// 角色表单
|
// 角色表单
|
||||||
const formData = reactive<any>({
|
const formData = reactive<any>({
|
||||||
|
id: '',
|
||||||
username: '',
|
username: '',
|
||||||
type: '',
|
type: '',
|
||||||
Instructions: '',
|
Instructions: '',
|
||||||
@@ -295,15 +293,17 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开角色弹窗
|
// 打开角色弹窗
|
||||||
function handleOpenDialog(roleId?: string) {
|
function handleOpenDialog(data: any = null) {
|
||||||
dialog.visible = true
|
dialog.visible = true
|
||||||
if (roleId) {
|
if (data) {
|
||||||
dialog.title = '修改角色'
|
dialog.title = '修改工资/奖金变更'
|
||||||
RoleAPI.getFormData(roleId).then((data) => {
|
if (data && Object.keys(data).length > 0) {
|
||||||
Object.assign(formData, data)
|
const data1 = deepCloneByJSON(data)
|
||||||
})
|
|
||||||
|
Object.assign(formData, data1)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dialog.title = '新增角色'
|
dialog.title = '新增工资/奖金变更'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,7 +314,7 @@ function handleSubmit() {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const roleId = formData.id
|
const roleId = formData.id
|
||||||
if (roleId) {
|
if (roleId) {
|
||||||
RoleAPI.update(roleId, formData)
|
FinanceEditBonusChange(formData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
handleCloseDialog()
|
handleCloseDialog()
|
||||||
@@ -354,7 +354,7 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}).then(
|
}).then(
|
||||||
() => {
|
() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
UserDeleteDepartment(id)
|
FinanceDeleteBonusChange(id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
handleResetQuery()
|
handleResetQuery()
|
||||||
@@ -366,58 +366,6 @@ const onUserDeleteDepartment = (id: string) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// 删除角色
|
|
||||||
function handleDelete(roleId?: number) {
|
|
||||||
const roleIds = [roleId || ids.value].join(',')
|
|
||||||
if (!roleIds) {
|
|
||||||
ElMessage.warning('请勾选删除项')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(
|
|
||||||
() => {
|
|
||||||
loading.value = true
|
|
||||||
RoleAPI.deleteByIds(roleIds)
|
|
||||||
.then(() => {
|
|
||||||
ElMessage.success('删除成功')
|
|
||||||
handleResetQuery()
|
|
||||||
})
|
|
||||||
.finally(() => (loading.value = false))
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
ElMessage.info('已取消删除')
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 打开分配菜单权限弹窗
|
|
||||||
// async function handleOpenAssignPermDialog(row: RolePageVO) {
|
|
||||||
// const roleId = row.id;
|
|
||||||
// if (roleId) {
|
|
||||||
// assignPermDialogVisible.value = true;
|
|
||||||
// loading.value = true;
|
|
||||||
//
|
|
||||||
// checkedRole.value.id = roleId;
|
|
||||||
// checkedRole.value.name = row.name;
|
|
||||||
//
|
|
||||||
// // 获取所有的菜单
|
|
||||||
// menuPermOptions.value = await MenuAPI.getOptions();
|
|
||||||
//
|
|
||||||
// // 回显角色已拥有的菜单
|
|
||||||
// RoleAPI.getRoleMenuIds(roleId)
|
|
||||||
// .then((data) => {
|
|
||||||
// const checkedMenuIds = data;
|
|
||||||
// checkedMenuIds.forEach((menuId) => permTreeRef.value!.setChecked(menuId, true, false));
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// loading.value = false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 分配菜单权限提交
|
// 分配菜单权限提交
|
||||||
function handleAssignPermSubmit() {
|
function handleAssignPermSubmit() {
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ export default defineConfig(({ mode }: ConfigEnv) => {
|
|||||||
'/dev-api/api2': {
|
'/dev-api/api2': {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
// target: 'http://47.108.113.7:8000',
|
// target: 'http://47.108.113.7:8000',
|
||||||
target: 'http://47.108.113.7:8000',
|
// target: 'http://47.108.113.7:8000',
|
||||||
// target: 'http://192.168.31.69:8006',
|
// target: 'http://192.168.31.69:8006',
|
||||||
// target: 'http://199.168.137.123:8000',
|
target: 'http://199.168.137.123:8000',
|
||||||
rewrite: (path: string) => {
|
rewrite: (path: string) => {
|
||||||
return path.replace(/^\/dev-api\/api2/, '')
|
return path.replace(/^\/dev-api\/api2/, '')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user