结算管理对接

This commit is contained in:
zzyuan 2024-12-05 17:52:22 +08:00
parent e429e80e14
commit de0edb532a
9 changed files with 149 additions and 29 deletions

70
src/api/cost/cost.js Normal file
View File

@ -0,0 +1,70 @@
import request from '@/utils/request'
// 查询费用结算申请列表
export function getSltAgreementInfo(query) {
return request({
url: '/material/slt_agreement_info/getSltAgreementInfo4Project',
method: 'get',
params: query
})
}
// 查询费用结算申请详情
export function getSltInfo(params){
return request({
url: '/material/slt_agreement_info/getSltInfo',
method: 'post',
data: params
})
}
// 费用结算申请提交
export function submitFee(params){
return request({
url: '/material/slt_agreement_info/submitFee',
method: 'post',
data: params
})
}
// 查询费用结算审核列表
export function getSltExam(query) {
return request({
url: '/material/slt_agreement_info/getSltExam',
method: 'get',
params: query
})
}
// 查询费用结算审核列表
export function getSltExamInfo(query) {
return request({
url: '/material/slt_agreement_info/getSltExamInfo',
method: 'get',
params: query
})
}
// 费用结算审核-同意拒绝
export function settlementReview(query) {
return request({
url: '/material/slt_agreement_info/settlementReview',
method: 'get',
params: query
})
}

View File

@ -12,7 +12,7 @@ import store from './store'
import router from './router' import router from './router'
import directive from './directive' // directive import directive from './directive' // directive
import plugins from './plugins' // plugins import plugins from './plugins' // plugins
import { download } from '@/utils/request' import { download,downloadJson } from '@/utils/request'
import './assets/icons' // icon import './assets/icons' // icon
import './permission' // permission control import './permission' // permission control
@ -48,6 +48,7 @@ Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download Vue.prototype.download = download
Vue.prototype.downloadJson = downloadJson
Vue.prototype.handleTree = handleTree Vue.prototype.handleTree = handleTree
Vue.prototype.globalUrl = global_ Vue.prototype.globalUrl = global_
// 全局组件挂载 // 全局组件挂载

View File

@ -184,4 +184,31 @@ export function download(url, params, filename, config) {
}) })
} }
// 通用下载方法
export function downloadJson(url, params, filename, config) {
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
return service.post(url, params, {
transformRequest: [(params) => { return params }],
headers: { 'Content-Type': 'application/json' },
responseType: 'blob',
...config
}).then(async (data) => {
const isBlob = blobValidate(data);
if (isBlob) {
const blob = new Blob([data])
saveAs(blob, filename)
} else {
const resText = await data.text();
const rspObj = JSON.parse(resText);
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
Message.error(errMsg);
}
downloadLoadingInstance.close();
}).catch((r) => {
console.error(r)
Message.error('下载文件出现错误,请联系管理员!')
downloadLoadingInstance.close();
})
}
export default service export default service

View File

@ -153,8 +153,7 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="减免费用" align="center" prop="subCost" width="180" <el-table-column label="减免费用" align="center" prop="subCost" width="180">
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-input-number <!-- <el-input-number
v-model="scope.row.subCost" v-model="scope.row.subCost"
@ -203,7 +202,7 @@
// getUnitList, // getUnitList,
// getProjectList, // getProjectList,
// } from '@/api/claimAndRefund/receive' // } from '@/api/claimAndRefund/receive'
// import { getSltInfo, submitFee, exportLease } from '@/api/cost/cost' import { getSltInfo, submitFee } from '@/api/cost/cost'
export default { export default {
name: 'Agreement', name: 'Agreement',
@ -229,9 +228,9 @@ export default {
} }
}, },
mounted() { mounted() {
// let arr = JSON.parse(this.$route.query.rowData) let arr = JSON.parse(this.$route.query.rowData)
// this.rowData = arr this.rowData = arr
// this.getDataAll() this.getDataAll()
// this.getUnitList(); // this.getUnitList();
// this.getProjectList(); // this.getProjectList();
}, },
@ -444,7 +443,7 @@ export default {
// //
handleBack() { handleBack() {
this.$tab.closeOpenPage({ this.$tab.closeOpenPage({
path: '/cost/cost/costApplyList', path: '/cost/costApplyList',
query: { query: {
isEdit: true, isEdit: true,
}, },
@ -454,7 +453,7 @@ export default {
// //
handleExport1() { handleExport1() {
this.downloadJson( this.downloadJson(
'material/sltAgreementInfo/exportLease', 'material/slt_agreement_info/exportLease',
JSON.stringify(this.rowData), JSON.stringify(this.rowData),
`租赁费用明细_${new Date().getTime()}.xlsx`, `租赁费用明细_${new Date().getTime()}.xlsx`,
) )
@ -462,7 +461,7 @@ export default {
// //
handleExport2() { handleExport2() {
this.downloadJson( this.downloadJson(
'material/sltAgreementInfo/exportLose', 'material/slt_agreement_info/exportLose',
JSON.stringify(this.rowData), JSON.stringify(this.rowData),
`丢失费用明细_${new Date().getTime()}.xlsx`, `丢失费用明细_${new Date().getTime()}.xlsx`,
) )
@ -470,7 +469,7 @@ export default {
// //
handleExport3() { handleExport3() {
this.downloadJson( this.downloadJson(
'material/sltAgreementInfo/exportRepair', 'material/slt_agreement_info/exportRepair',
JSON.stringify(this.rowData), JSON.stringify(this.rowData),
`维修费用明细_${new Date().getTime()}.xlsx`, `维修费用明细_${new Date().getTime()}.xlsx`,
) )
@ -478,7 +477,7 @@ export default {
// //
handleExport4() { handleExport4() {
this.downloadJson( this.downloadJson(
'material/sltAgreementInfo/exportScrap', 'material/slt_agreement_info/exportScrap',
JSON.stringify(this.rowData), JSON.stringify(this.rowData),
`报废费用明细_${new Date().getTime()}.xlsx`, `报废费用明细_${new Date().getTime()}.xlsx`,
) )

View File

@ -120,10 +120,10 @@
/> />
<!-- 协议单弹窗 --> <!-- 协议单弹窗 -->
<el-dialog :title="title" :visible.sync="openPrint" width="1100px" append-to-body> <el-dialog :visible.sync="openPrint" width="1100px" append-to-body>
<div style="height: 600px; overflow-y: scroll"> <div style="height: 600px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print"> <vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div class="title" style="text-align: center; font-weight: 600; font-size: 16px"> <div style="text-align: center; font-weight: 600; font-size: 16px">
机具设备有偿使用费结算协议书 机具设备有偿使用费结算协议书
</div> </div>
<div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap"> <div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap">
@ -214,7 +214,7 @@ import {
getUnitList, getUnitList,
getAgreementInfoById, getAgreementInfoById,
} from '@/api/back/index.js' } from '@/api/back/index.js'
// import { getSltAgreementInfo } from '@/api/cost/cost' import { getSltAgreementInfo } from '@/api/cost/cost'
import vueEasyPrint from "vue-easy-print"; import vueEasyPrint from "vue-easy-print";
export default { export default {
name: '', name: '',
@ -341,6 +341,18 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.unitIds=[]
this.projectIds=[]
this.queryParams={
pageNum: 1,
pageSize: 10,
sltStatus: '',
isCommit:'',
unitId: '',
projectId: '',
agreementId: '',
agreementCode: '',
}
this.resetForm('queryForm') this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
}, },
@ -351,7 +363,7 @@ export default {
console.log(this.ids) console.log(this.ids)
console.log(JSON.stringify(arr)) console.log(JSON.stringify(arr))
this.$tab.closeOpenPage({ this.$tab.closeOpenPage({
path: '/cost/cost/costApplyAdd', path: '/cost/costApplyDetail',
query: { query: {
rowData: JSON.stringify(arr), rowData: JSON.stringify(arr),
}, },

View File

@ -96,10 +96,10 @@
/> />
<!-- 协议单弹窗 --> <!-- 协议单弹窗 -->
<el-dialog :title="title" :visible.sync="openPrint" width="1100px" append-to-body> <el-dialog :visible.sync="openPrint" width="1100px" append-to-body>
<div style="height: 600px; overflow-y: scroll"> <div style="height: 600px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print"> <vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div class="title" style="text-align: center; font-weight: 600; font-size: 16px"> <div style="text-align: center; font-weight: 600; font-size: 16px">
机具设备有偿使用费结算协议书 机具设备有偿使用费结算协议书
</div> </div>
<div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap"> <div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap">
@ -189,7 +189,7 @@ import {
getUnitList, getUnitList,
getAgreementInfoById, getAgreementInfoById,
} from '@/api/back/index.js' } from '@/api/back/index.js'
// import { getSltExam } from '@/api/cost/cost' import { getSltExam } from '@/api/cost/cost'
import vueEasyPrint from "vue-easy-print"; import vueEasyPrint from "vue-easy-print";
export default { export default {
name: 'CostApplyList', name: 'CostApplyList',

View File

@ -150,7 +150,7 @@
// getUnitList, // getUnitList,
// getProjectList, // getProjectList,
// } from '@/api/claimAndRefund/receive' // } from '@/api/claimAndRefund/receive'
// import { getSltExamInfo, settlementReview } from '@/api/cost/cost' import { getSltExamInfo, settlementReview } from '@/api/cost/cost'
export default { export default {
name: 'Agreement', name: 'Agreement',

View File

@ -18,10 +18,10 @@
disabled disabled
/> />
</el-form-item> </el-form-item>
<el-form-item label="工程名称" prop="projectName"> <el-form-item label="退料单位" prop="projectName">
<el-input <el-input
v-model="maForm.projectName" v-model="maForm.projectName"
placeholder="请输入工程名称" placeholder="请输入退料单位"
clearable clearable
maxlength="50" maxlength="50"
style="width: 240px" style="width: 240px"
@ -32,7 +32,6 @@
<el-form-item label="维修单号" prop="repairNum"> <el-form-item label="维修单号" prop="repairNum">
<el-input <el-input
v-model="maForm.repairNum" v-model="maForm.repairNum"
placeholder="请输入维修单号"
clearable clearable
maxlength="50" maxlength="50"
style="width: 240px" style="width: 240px"
@ -49,6 +48,7 @@
plain plain
icon="el-icon-check" icon="el-icon-check"
size="mini" size="mini"
:disabled="multiple"
@click="handlePassAll" @click="handlePassAll"
>通过</el-button >通过</el-button
> >
@ -59,6 +59,7 @@
plain plain
icon="el-icon-close" icon="el-icon-close"
size="mini" size="mini"
:disabled="multiple"
@click="handleFailAll" @click="handleFailAll"
>驳回</el-button >驳回</el-button
> >
@ -126,8 +127,13 @@
align="center" align="center"
prop="alNum" prop="alNum"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> >
<template slot-scope="scope">
<!-- 0编码1数量 -->
<div v-if="scope.row.manageType==0">编码管理</div>
<div v-if="scope.row.manageType==1">数量管理</div>
</template>
</el-table-column>
<el-table-column <el-table-column
label="审核状态" label="审核状态"
align="center" align="center"

View File

@ -97,8 +97,13 @@
align="center" align="center"
prop="alNum" prop="alNum"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> >
<template slot-scope="scope">
<!-- 0编码1数量 -->
<div v-if="scope.row.manageType==0">编码管理</div>
<div v-if="scope.row.manageType==1">数量管理</div>
</template>
</el-table-column>
<el-table-column <el-table-column
label="审核状态" label="审核状态"
align="center" align="center"