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