结算管理
This commit is contained in:
parent
353902a469
commit
a876f1bbfd
|
|
@ -87,7 +87,19 @@ export const costAuditingPassApi = (params) => {
|
|||
params
|
||||
})
|
||||
}
|
||||
|
||||
/** 获取工程下拉接口*/
|
||||
export const getProjectListByUnitIds = (params) => {
|
||||
return request.get('/material/sltAgreementInfo/getProjectListByUnitIds', {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/** 获取单位下拉接口*/
|
||||
export const getUnitListByProjetctIds = (params) => {
|
||||
return request.get('/material/sltAgreementInfo/getUnitListByProjetctIds', {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<div>
|
||||
<PageHeader :pageContent="pageContent" @goBack="goBack" />
|
||||
<div class="row-header">
|
||||
<div>领用单位:{{ currRowInfo.unitName }}</div>
|
||||
<div>工程名称:{{ currRowInfo.projectName }}</div>
|
||||
<div>领用单位:{{ uniqueUnitNames.join(', ') }}</div>
|
||||
<div>工程名称:{{ uniqueProjectNames.join(', ') }}</div>
|
||||
<div>总合计:{{ totalAmount }}元</div>
|
||||
<div>
|
||||
<el-button
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
:listType="3"
|
||||
:isRepair="true"
|
||||
:tableTitle="`设备维修清单`"
|
||||
:currRowInfo="currRowInfo"
|
||||
:currRowInfo="currRowInfo[0]"
|
||||
:tableData="repairTableData"
|
||||
@handleExport="handleExport"
|
||||
:totalPrice="repairTotalPrice"
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
size="mini"
|
||||
type="primary"
|
||||
@click="submitComSett"
|
||||
v-if="currRowInfo.isSlt == 0"
|
||||
v-if="currRowInfo[0].isSlt == 0"
|
||||
>确认完工结算</el-button
|
||||
>
|
||||
</el-row>
|
||||
|
|
@ -124,11 +124,19 @@ export default {
|
|||
},
|
||||
// 当前行的数据信息
|
||||
currRowInfo: {
|
||||
type: Object,
|
||||
default: () => null,
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
// 计算去重后的领用单位
|
||||
uniqueUnitNames() {
|
||||
return [...new Set(this.currRowInfo.map(item => item.unitName))].filter(name => name);
|
||||
},
|
||||
// 计算去重后的工程名称
|
||||
uniqueProjectNames() {
|
||||
return [...new Set(this.currRowInfo.map(item => item.projectName))].filter(name => name);
|
||||
},
|
||||
totalAmount() {
|
||||
return (
|
||||
this.settleTotalPrice_01 * 1 +
|
||||
|
|
@ -238,9 +246,8 @@ export default {
|
|||
methods: {
|
||||
/** 获取结算信息 */
|
||||
async getComSellList() {
|
||||
const { data: res } = await getComSellQueryApi([
|
||||
{ agreementId: this.currRowInfo.agreementId },
|
||||
])
|
||||
console.log("xxxxxxxxxxxxxxxx", this.currRowInfo)
|
||||
const { data: res } = await getComSellQueryApi(this.currRowInfo)
|
||||
|
||||
this.settleTableData_01 = res.leaseListOne // 01承担方
|
||||
this.settleTableData_03 = res.leaseListThree // 03承担方
|
||||
|
|
|
|||
|
|
@ -12,10 +12,13 @@
|
|||
>
|
||||
<el-form-item label="结算单位" prop="unitId">
|
||||
<el-select
|
||||
v-model="queryParams.unitId"
|
||||
v-model="unitIds"
|
||||
placeholder="请选择往来单位"
|
||||
clearable
|
||||
filterable
|
||||
multiple
|
||||
collapse-tags
|
||||
@change="unitChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in unitList"
|
||||
|
|
@ -31,6 +34,7 @@
|
|||
placeholder="请选择工程名称"
|
||||
clearable
|
||||
filterable
|
||||
@change="proChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in projectList"
|
||||
|
|
@ -76,6 +80,14 @@
|
|||
@click="handleBatchExport"
|
||||
>批量导出月结明细表</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="handleBatchSlt"
|
||||
:disabled="
|
||||
ids.length == 0 "
|
||||
>批量结算</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
|
@ -86,7 +98,7 @@
|
|||
@selection-change="handleSelectionChange"
|
||||
ref="tableRef"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="selectAble"/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="序号"
|
||||
|
|
@ -195,7 +207,7 @@
|
|||
|
||||
<script>
|
||||
import { getUnitList, getProjectList } from '@/api/claimAndRefund/receive'
|
||||
import { getSltAgreementInfo } from '@/api/cost/cost'
|
||||
import { getSltAgreementInfo,getProjectListByUnitIds,getUnitListByProjetctIds } from '@/api/cost/cost'
|
||||
|
||||
import ExportDialog from './component/exportDialog.vue'
|
||||
import MonthRecord from './component/monthRecord.vue'
|
||||
|
|
@ -248,6 +260,8 @@ export default {
|
|||
unitId: '',
|
||||
projectId: '',
|
||||
},
|
||||
// 结算单位ids
|
||||
unitIds: [],
|
||||
// 批量导出月结明细弹框
|
||||
exportDialogVisible: false,
|
||||
// 月结记录弹框
|
||||
|
|
@ -255,7 +269,7 @@ export default {
|
|||
// 是否显示主页
|
||||
isHome: true,
|
||||
// 当前行信息
|
||||
currRowInfo: null,
|
||||
currRowInfo: [],
|
||||
// 页面标题
|
||||
pageContent: '',
|
||||
// 查询月结记录的参数
|
||||
|
|
@ -270,6 +284,62 @@ export default {
|
|||
this.getProjectList()
|
||||
},
|
||||
methods: {
|
||||
//获取结算单位下的结算工程
|
||||
unitChange(val){
|
||||
console.log("xxxxxxxxxx",val)
|
||||
if(val.length==0){
|
||||
setTimeout(()=>{
|
||||
this.getProjectList()
|
||||
},500)
|
||||
return
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.queryParams.projectId=null
|
||||
this.GetProData()
|
||||
},500)
|
||||
},
|
||||
//获取结算工程下的结算单位
|
||||
proChange(val){
|
||||
console.log("xxxxxxxxxx",val)
|
||||
if(!val){
|
||||
setTimeout(()=>{
|
||||
this.getUnitList()
|
||||
},500)
|
||||
return
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.GetUnitData()
|
||||
},500)
|
||||
},
|
||||
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const unitIdsAsNumbers = this.unitIds.map(id => Number(id));
|
||||
const params = {
|
||||
unitIds: unitIdsAsNumbers,
|
||||
}
|
||||
const res = await getProjectListByUnitIds(params)
|
||||
this.projectList = res.data;
|
||||
|
||||
},
|
||||
// 获取 单位名称 列表数据
|
||||
async GetUnitData() {
|
||||
|
||||
const params = {
|
||||
projectId: this.queryParams.projectId,
|
||||
}
|
||||
const res = await getUnitListByProjetctIds(params)
|
||||
this.unitList = res.data;
|
||||
|
||||
},
|
||||
|
||||
selectAble(row) {
|
||||
if (row.isSlt != 1) {
|
||||
return true
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
},
|
||||
//获取单位类型 ,getUnitList, getProjectList
|
||||
getUnitList() {
|
||||
getUnitList().then((response) => {
|
||||
|
|
@ -285,7 +355,14 @@ export default {
|
|||
/** 查询字典类型列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
getSltAgreementInfo(this.queryParams).then((response) => {
|
||||
const params = {
|
||||
unitIds: this.unitIds,
|
||||
projectId: this.queryParams.projectId,
|
||||
sltStatus: this.queryParams.sltStatus,
|
||||
pageNum: this.queryParams.pageNum,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
}
|
||||
getSltAgreementInfo(params).then((response) => {
|
||||
this.agreementList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
|
|
@ -300,6 +377,7 @@ export default {
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = []
|
||||
this.unitIds = []
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
|
|
@ -332,6 +410,13 @@ export default {
|
|||
this.ids = selection.map((item) => item)
|
||||
},
|
||||
|
||||
// 批量结算
|
||||
handleBatchSlt() {
|
||||
this.currRowInfo = this.ids
|
||||
this.pageContent = '完工结算'
|
||||
this.isHome = false
|
||||
},
|
||||
|
||||
/** 批量导出月结明细表 */
|
||||
handleBatchExport() {
|
||||
console.log('批量导出月结明细表')
|
||||
|
|
@ -379,7 +464,7 @@ export default {
|
|||
},
|
||||
/** 完工结算 结算明细*/
|
||||
handleFinishCostAndDetails(row, isSlt) {
|
||||
this.currRowInfo = row
|
||||
this.currRowInfo = [row]
|
||||
// this.pageContent = '结算明细'
|
||||
isSlt == 1
|
||||
? (this.pageContent = '结算明细')
|
||||
|
|
|
|||
Loading…
Reference in New Issue